WP Photo Album Plus - Version 7.5.03.006

Version Description

= 7.5.03 =

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

Release Info

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

Code changes from version 7.5.02.008 to 7.5.03.006

changelog.txt CHANGED
@@ -1,5 +1,16 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 7.5.02 =
4
 
5
  * Lightbox enhancements.
1
  WP Photo Album Plus Changelog
2
 
3
+ = 7.5.03 =
4
+
5
+ * Performance improvements, especially in extended duplicate removal and skip separates in photo search and tag search operations.
6
+ To reduce http requests, there is now a combined compressed js file.
7
+ * Now uses wp supplied jquery-masonry library rather than the one in the vendor subfolder wich has been removed.
8
+ * Restored admin spinner that had been erroneously removed.
9
+ * Table IX-E2: Exclude separate, now also applies to search by tag(s).
10
+ * Some browsers do not accept entering fullscreen mode programmatically when not invoked by a direct user action like clicking a link or a button.
11
+ To overcome these problems, and because some users asked me to restore the ability to run lightbox on mobile in normal mode, lightbox will now always start in normal mode, both on pc and on mobile.
12
+ Both versions will have the fullscreen button to switch to fulscreen (and back) if desired.
13
+
14
  = 7.5.02 =
15
 
16
  * Lightbox enhancements.
img/loader.svg ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg width='120px' height='120px' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="uil-default">
2
+ <rect x="0" y="0" width="100" height="100" fill="none" class="bk">
3
+ </rect>
4
+ <rect class="wppa-ajaxspin" x='47' y='40' width='6' height='20' rx='3' ry='3' transform='rotate(0 50 50) translate(0 -32)'>
5
+ <animate attributeName='opacity' from='1' to='0' dur='1.5s' begin='0s' repeatCount='indefinite'/>
6
+ </rect>
7
+ <rect class="wppa-ajaxspin" x='47' y='40' width='6' height='20' rx='3' ry='3' transform='rotate(22.5 50 50) translate(0 -32)'>
8
+ <animate attributeName='opacity' from='1' to='0' dur='1.5s' begin='0.09375s' repeatCount='indefinite'/>
9
+ </rect>
10
+ <rect class="wppa-ajaxspin" x='47' y='40' width='6' height='20' rx='3' ry='3' transform='rotate(45 50 50) translate(0 -32)'>
11
+ <animate attributeName='opacity' from='1' to='0' dur='1.5s' begin='0.1875s' repeatCount='indefinite'/>
12
+ </rect>
13
+ <rect class="wppa-ajaxspin" x='47' y='40' width='6' height='20' rx='3' ry='3' transform='rotate(67.5 50 50) translate(0 -32)'>
14
+ <animate attributeName='opacity' from='1' to='0' dur='1.5s' begin='0.28125s' repeatCount='indefinite'/>
15
+ </rect>
16
+ <rect class="wppa-ajaxspin" x='47' y='40' width='6' height='20' rx='3' ry='3' transform='rotate(90 50 50) translate(0 -32)'>
17
+ <animate attributeName='opacity' from='1' to='0' dur='1.5s' begin='0.375s' repeatCount='indefinite'/>
18
+ </rect>
19
+ <rect class="wppa-ajaxspin" x='47' y='40' width='6' height='20' rx='3' ry='3' transform='rotate(112.5 50 50) translate(0 -32)'>
20
+ <animate attributeName='opacity' from='1' to='0' dur='1.5s' begin='0.46875s' repeatCount='indefinite'/>
21
+ </rect>
22
+ <rect class="wppa-ajaxspin" x='47' y='40' width='6' height='20' rx='3' ry='3' transform='rotate(135 50 50) translate(0 -32)'>
23
+ <animate attributeName='opacity' from='1' to='0' dur='1.5s' begin='0.5625s' repeatCount='indefinite'/>
24
+ </rect>
25
+ <rect class="wppa-ajaxspin" x='47' y='40' width='6' height='20' rx='3' ry='3' transform='rotate(157.5 50 50) translate(0 -32)'>
26
+ <animate attributeName='opacity' from='1' to='0' dur='1.5s' begin='0.65625s' repeatCount='indefinite'/>
27
+ </rect>
28
+ <rect class="wppa-ajaxspin" x='47' y='40' width='6' height='20' rx='3' ry='3' transform='rotate(180 50 50) translate(0 -32)'>
29
+ <animate attributeName='opacity' from='1' to='0' dur='1.5s' begin='0.75s' repeatCount='indefinite'/>
30
+ </rect>
31
+ <rect class="wppa-ajaxspin" x='47' y='40' width='6' height='20' rx='3' ry='3' transform='rotate(202.5 50 50) translate(0 -32)'>
32
+ <animate attributeName='opacity' from='1' to='0' dur='1.5s' begin='0.84375s' repeatCount='indefinite'/>
33
+ </rect>
34
+ <rect class="wppa-ajaxspin" x='47' y='40' width='6' height='20' rx='3' ry='3' transform='rotate(225 50 50) translate(0 -32)'>
35
+ <animate attributeName='opacity' from='1' to='0' dur='1.5s' begin='0.9375s' repeatCount='indefinite'/>
36
+ </rect>
37
+ <rect class="wppa-ajaxspin" x='47' y='40' width='6' height='20' rx='3' ry='3' transform='rotate(247.5 50 50) translate(0 -32)'>
38
+ <animate attributeName='opacity' from='1' to='0' dur='1.5s' begin='1.03125s' repeatCount='indefinite'/>
39
+ </rect>
40
+ <rect class="wppa-ajaxspin" x='47' y='40' width='6' height='20' rx='3' ry='3' transform='rotate(270 50 50) translate(0 -32)'>
41
+ <animate attributeName='opacity' from='1' to='0' dur='1.5s' begin='1.125s' repeatCount='indefinite'/>
42
+ </rect>
43
+ <rect class="wppa-ajaxspin" x='47' y='40' width='6' height='20' rx='3' ry='3' transform='rotate(292.5 50 50) translate(0 -32)'>
44
+ <animate attributeName='opacity' from='1' to='0' dur='1.5s' begin='1.21875s' repeatCount='indefinite'/>
45
+ </rect>
46
+ <rect class="wppa-ajaxspin" x='47' y='40' width='6' height='20' rx='3' ry='3' transform='rotate(315 50 50) translate(0 -32)'>
47
+ <animate attributeName='opacity' from='1' to='0' dur='1.5s' begin='1.3125s' repeatCount='indefinite'/>
48
+ </rect>
49
+ <rect class="wppa-ajaxspin" x='47' y='40' width='6' height='20' rx='3' ry='3' transform='rotate(337.5 50 50) translate(0 -32)'>
50
+ <animate attributeName='opacity' from='1' to='0' dur='1.5s' begin='1.40625s' repeatCount='indefinite'/>
51
+ </rect>
52
+ </svg>
js/wppa-ajax-front.js CHANGED
@@ -112,13 +112,10 @@ function wppaDoAjaxRender( mocc, ajaxurl, newurl, add, waitfor, addHilite ) {
112
  newurl = newurl.split('&amp;').join('&');
113
  try {
114
  history.pushState( {page: wppaHis, occur: mocc, type: 'html', html: result}, "", newurl );
115
- wppaConsoleLog( 'Ajax rendering: History stack pushed', 'force' );
116
-
117
  }
118
  catch( err ) {
119
  try {
120
  history.replaceState( {page: wppaHis, occur: mocc, type: 'html'}, "", newurl );
121
- wppaConsoleLog( 'Ajax rendering: History stack updated', 'force' );
122
  }
123
  catch( err ) {
124
  wppaConsoleLog( 'Ajax rendering: History stack update failed', 'force' );
@@ -133,23 +130,12 @@ function wppaDoAjaxRender( mocc, ajaxurl, newurl, add, waitfor, addHilite ) {
133
 
134
  // Update qrcode
135
  if ( typeof( wppaQRUpdate ) != 'undefined' ) {
136
- wppaConsoleLog( 'Ajax render asked qr code for '+newurl, 'force' );
137
  wppaQRUpdate( newurl );
138
  }
139
 
140
  // Run Autocol?
141
  wppaColWidth[mocc] = 0;
142
  _wppaDoAutocol( mocc, 'ajax' );
143
-
144
- // Report if scripts
145
- var scriptPos = result.indexOf( '<script' );
146
- var scriptPosLast = result.lastIndexOf( '<script' );
147
- if ( scriptPos == -1 ) {
148
- wppaConsoleLog( 'Ajax render did NOT contain a script tag', 'force' );
149
- }
150
- else {
151
- wppaConsoleLog( 'Ajax render did contain a script tag at position '+scriptPos+' last at '+scriptPosLast, 'force' );
152
- }
153
  },
154
  error: function( xhr, status, error ) {
155
  wppaConsoleLog( 'wppaDoAjaxRender failed. Error = ' + error + ', status = ' + status, 'force' );
@@ -425,8 +411,6 @@ function wppaAjaxDeleteMyZip() {
425
  // Request Info
426
  function wppaAjaxRequestInfo( mocc, id, reload ) {
427
 
428
- wppaConsoleLog( 'wppaAjaxRequestInfo started', 'force');
429
-
430
  dialogHtml =
431
  '<h3>' + wppaRequestInfoDialogText + '</h3>' +
432
  '<textarea id="wppa-request-info-text-'+mocc+'" style="width:98%;" ></textarea>' +
@@ -474,9 +458,8 @@ wppaConsoleLog( 'wppaAjaxRequestInfo started', 'force');
474
  jQuery( '.ui-button' ).attr( 'title', 'Close' );
475
 
476
  }
477
- function wppaAjaxRequestInfoSend( mocc, id, reload ) {
478
 
479
- wppaConsoleLog( 'wppaAjaxRequestInfoSend started', 'force');
480
 
481
  jQuery.ajax( { url: wppaAjaxUrl,
482
  data: 'action=wppa' +
@@ -718,7 +701,6 @@ function _bumpClickCount( photo ) {
718
  type: 'GET',
719
  timeout: 60000,
720
  success: function( result, status, xhr ) {
721
- wppaConsoleLog( '_bumpClickCount success.' );
722
  },
723
  error: function( xhr, status, error ) {
724
  wppaConsoleLog( '_bumpClickCount failed. Error = ' + error + ', status = ' + status, 'force' );
@@ -734,7 +716,6 @@ function _bumpViewCount( photo ) {
734
 
735
  // Already bumped?
736
  if ( wppaPhotoView[photo] ) {
737
- // wppaConsoleLog( '_bumpViewCount not done. Duplicate ' + photo );
738
  return;
739
  }
740
 
@@ -748,7 +729,6 @@ function _bumpViewCount( photo ) {
748
  timeout: 60000,
749
  success: function( result, status, xhr ) {
750
  wppaPhotoView[photo] = true;
751
- // wppaConsoleLog( '_bumpViewCount '+photo+' success.' );
752
  },
753
  error: function( xhr, status, error ) {
754
  wppaConsoleLog( '_bumpViewCount failed. Error = ' + error + ', status = ' + status, 'force' );
@@ -928,8 +908,6 @@ function _wppaOvlRateIt( id, value, mocc, reloadAfter ) {
928
  jQuery( '#wppa-like-0' ).attr( 'src', wppaImageDirectory+'spinner.gif' );
929
  },
930
  success: function( result, status, xhr ) {
931
- // alert(result);
932
- wppaConsoleLog(result, 'force');
933
 
934
  var ArrValues = result.split( "||" );
935
 
@@ -1243,7 +1221,6 @@ function wppaAjaxSetQrCodeSrc( url, elm ) {
1243
  // document.getElementById( elm ).title = temp[1]; // does not work
1244
  // jQuery( elm ).attr( 'src', temp[0] ); // does not work
1245
  jQuery( elm ).attr( 'title', temp[1] );
1246
- wppaConsoleLog( 'wppaAjaxSetQrCodeSrc put '+result+' into '+elm );
1247
  },
1248
  error: function( xhr, status, error ) {
1249
  wppaConsoleLog( 'wppaAjaxSetQrCodeSrc failed. Error = ' + error + ', status = ' + status, 'force' );
@@ -1274,7 +1251,3 @@ function wppaAjaxNotify( elm, list ) {
1274
  }
1275
  } );
1276
  }
1277
-
1278
-
1279
- // Log we're in.
1280
- wppaConsoleLog( 'wppa-ajax-front.js version '+wppaJsAjaxVersion+' loaded.', 'force' );
112
  newurl = newurl.split('&amp;').join('&');
113
  try {
114
  history.pushState( {page: wppaHis, occur: mocc, type: 'html', html: result}, "", newurl );
 
 
115
  }
116
  catch( err ) {
117
  try {
118
  history.replaceState( {page: wppaHis, occur: mocc, type: 'html'}, "", newurl );
 
119
  }
120
  catch( err ) {
121
  wppaConsoleLog( 'Ajax rendering: History stack update failed', 'force' );
130
 
131
  // Update qrcode
132
  if ( typeof( wppaQRUpdate ) != 'undefined' ) {
 
133
  wppaQRUpdate( newurl );
134
  }
135
 
136
  // Run Autocol?
137
  wppaColWidth[mocc] = 0;
138
  _wppaDoAutocol( mocc, 'ajax' );
 
 
 
 
 
 
 
 
 
 
139
  },
140
  error: function( xhr, status, error ) {
141
  wppaConsoleLog( 'wppaDoAjaxRender failed. Error = ' + error + ', status = ' + status, 'force' );
411
  // Request Info
412
  function wppaAjaxRequestInfo( mocc, id, reload ) {
413
 
 
 
414
  dialogHtml =
415
  '<h3>' + wppaRequestInfoDialogText + '</h3>' +
416
  '<textarea id="wppa-request-info-text-'+mocc+'" style="width:98%;" ></textarea>' +
458
  jQuery( '.ui-button' ).attr( 'title', 'Close' );
459
 
460
  }
 
461
 
462
+ function wppaAjaxRequestInfoSend( mocc, id, reload ) {
463
 
464
  jQuery.ajax( { url: wppaAjaxUrl,
465
  data: 'action=wppa' +
701
  type: 'GET',
702
  timeout: 60000,
703
  success: function( result, status, xhr ) {
 
704
  },
705
  error: function( xhr, status, error ) {
706
  wppaConsoleLog( '_bumpClickCount failed. Error = ' + error + ', status = ' + status, 'force' );
716
 
717
  // Already bumped?
718
  if ( wppaPhotoView[photo] ) {
 
719
  return;
720
  }
721
 
729
  timeout: 60000,
730
  success: function( result, status, xhr ) {
731
  wppaPhotoView[photo] = true;
 
732
  },
733
  error: function( xhr, status, error ) {
734
  wppaConsoleLog( '_bumpViewCount failed. Error = ' + error + ', status = ' + status, 'force' );
908
  jQuery( '#wppa-like-0' ).attr( 'src', wppaImageDirectory+'spinner.gif' );
909
  },
910
  success: function( result, status, xhr ) {
 
 
911
 
912
  var ArrValues = result.split( "||" );
913
 
1221
  // document.getElementById( elm ).title = temp[1]; // does not work
1222
  // jQuery( elm ).attr( 'src', temp[0] ); // does not work
1223
  jQuery( elm ).attr( 'title', temp[1] );
 
1224
  },
1225
  error: function( xhr, status, error ) {
1226
  wppaConsoleLog( 'wppaAjaxSetQrCodeSrc failed. Error = ' + error + ', status = ' + status, 'force' );
1251
  }
1252
  } );
1253
  }
 
 
 
 
js/wppa-ajax-front.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsAjaxVersion="7.4.01",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(n,a,i,e,p,t){0<parseInt(p)&&p!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+n+", '"+a+"', '"+i+"', '"+e+"', "+p+" )",100):(wppaRenderAdd=e,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[n]&&(a+="&resp=1"),t&&_wppaCurIdx[n]&&_wppaId[n][_wppaCurIdx[n]]&&(a+="&wppa-hilite="+_wppaId[n][_wppaCurIdx[n]]),wppaCanAjaxRender||!i?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[n]&&_wppaStop(n),jQuery("#wppa-ajax-spin-"+n).fadeIn()},success:function(a,e,p){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+n+"-end"):wppaRenderModal&&i?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(n),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+n).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(n)})):(jQuery("#wppa-container-"+n).html(a),jQuery("#wppa-button-hide-"+n).show()),wppaCanPushState&&wppaUpdateAddressLine&&i){wppaHis++,i=i.split("&amp;").join("&");try{history.pushState({page:wppaHis,occur:n,type:"html",html:a},"",i),wppaConsoleLog("Ajax rendering: History stack pushed","force")}catch(a){try{history.replaceState({page:wppaHis,occur:n,type:"html"},"",i),wppaConsoleLog("Ajax rendering: History stack updated","force")}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=n)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&(wppaConsoleLog("Ajax render asked qr code for "+i,"force"),wppaQRUpdate(i)),wppaColWidth[n]=0,_wppaDoAutocol(n,"ajax");var o=a.indexOf("<script"),r=a.lastIndexOf("<script");-1==o?wppaConsoleLog("Ajax render did NOT contain a script tag","force"):wppaConsoleLog("Ajax render did contain a script tag at position "+o+" last at "+r,"force")},error:function(a,e,p){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+p+", status = "+e,"force"),document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n,"ajax")},complete:function(a,e,p){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+n).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+n).stop().fadeOut(),_wppaLazyDone[n]=!1,_wppaLazyDone[0]=!1,window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=i,wppaColWidth[n]=0,_wppaDoAutocol(n,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhotoFromZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=removefromzip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-rem-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-rem-"+r+"-"+o).prop("disabled",!0),jQuery("#admin-choice-rem-"+r+"-"+o).css("text-decoration","")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhotoFromZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,e,p){document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRequestInfo(a,e,p){wppaConsoleLog("wppaAjaxRequestInfo started","force"),dialogHtml="<h3>"+wppaRequestInfoDialogText+'</h3><textarea id="wppa-request-info-text-'+a+'" style="width:98%;" ></textarea><div style="clear:both;" ></div><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Send" onclick="wppaAjaxRequestInfoSend( '+a+", "+e+", "+p+' )" /><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Cancel" onclick="jQuery( \'#wppa-modal-container-'+a+"' ).dialog( 'close' );\" /><div style=\"clear:both;\" ></div>";var t={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(dialogHtml).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}function wppaAjaxRequestInfoSend(o,r,n){wppaConsoleLog("wppaAjaxRequestInfoSend started","force"),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r+"&emailtext="+jQuery("#wppa-request-info-text-"+o).val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#request-info-"+r+"-"+o).val(t[1]),jQuery("#request-info-"+r+"-"+o).prop("disabled",!0),jQuery("#wppa-modal-container-"+o).dialog("close")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRequestInfoSend failed. Error = "+p+", status = "+e,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),p="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){var e;"classic"==wppaUploadEdit&&((r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>"),e='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+p+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>',r.document.write(e),r.document.write("</head>"),r.document.write("<body>"))},success:function(a,e,p){var t;"classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit&&(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"))},error:function(a,e,p){"classic"==wppaUploadEdit&&r.document.write(e+" "+p),wppaConsoleLog("wppaEditPhoto failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,e,p,t){for(var o,r,n=jQuery("."+a),i=[],c=jQuery("#"+p).val(),u=0,s=0;u<n.length;)n[u].selected&&(i[s]=n[u].value,s++),u++;""!=(o=jQuery("#"+e).val())&&(i[s]=o),r=i.join(),""==o&&""==p||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,e,p){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,e,p){jQuery("#"+t).html('<span style="color:red" >'+p+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDestroyAlbum(a,e){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+e,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+p+", status = "+e,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,e,p){wppaConsoleLog("_bumpClickCount success.")},error:function(a,e,p){wppaConsoleLog("_bumpClickCount failed. Error = "+p+", status = "+e,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){wppaPhotoView[t]=!0},error:function(a,e,p){wppaConsoleLog("_bumpViewCount failed. Error = "+p+", status = "+e,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,e,p){wppaConsoleLog("wppaVoteThumb failed. Error = "+p+", status = "+e,"force")}})}function _wppaRateIt(r,e){var a,p,t;0!=e&&(_wppaSSRuns[r]||(a=_wppaId[r][_wppaCurIdx[r]],p=_wppaMyr[r][_wppaCurIdx[r]],0<(t=_wppaWaitTexts[r][_wppaCurIdx[r]]).length?alert(t):0!=p&&wppaRatingOnce||p<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+e+"&wppa-rating-id="+a+"&wppa-occur="+r+"&wppa-index="+_wppaCurIdx[r]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+r+"-"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+r+"-"+e).stop().fadeTo(100,1),jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t,o=a.split("||");0==o[0]?900==o[1]?(alert(o[2]),_wppaSetRatingDisplay(r)):alert("Error Code="+o[1]+"\n\n"+o[2]):(o[7]&&"likes"==o[7]?(t=o[4].split("|"),jQuery("#wppa-like-"+r).attr("title",t[0]),jQuery("#wppa-liketext-"+r).html(t[1]),"1"==o[3]?jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4]):(_wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4],_wppaDisc[o[0]][o[2]]=o[5],_wppaSetRatingDisplay(r),wppaCommentRequiredAfterVote&&0==o[6]&&alert(o[7])),wppaNextOnCallback&&_wppaNextOnCallback(r))},error:function(a,e,p){wppaConsoleLog("_wppaRateIt failed. Error = "+p+", status = "+e,"force")}}))))}function _wppaOvlRateIt(r,n,i,c){0!=n&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+n+"&wppa-rating-id="+r+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+i+"-"+n).stop().fadeTo(100,1),jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){wppaConsoleLog(a,"force");var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){var o=t[4].split("|");return jQuery("#wppa-like-0").attr("title",o[0]),jQuery("#wppa-liketext-0").html(o[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+r+"-"+i).attr("title",o[0]),jQuery("#wppa-liketext-"+r+"-"+i).html(o[1]),void("1"==t[3]?jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbup.png"))}if(_wppaSetRd(i,t[4],".wppa-avg-"),_wppaSetRd(i,t[3],".wppa-rate-"),c)return;wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,e,p){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxMakeOrigName(a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+e+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,e,p){var t=a.split("||");"0"==t[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.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,e,p){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,e,p){var t=a.split("||"),o=t[0],r=t[1],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,e,p){alert("An error occurred:\n"+p+"\nPlease try again")},complete:function(a,e,p){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){var e;_wppaValidateComment(t,a)&&(e="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t,void 0!==jQuery("#wppa-comemail-"+t).val()&&(e+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(e+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(e+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(e+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:e,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,e,p){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,e,p){wppaConsoleLog("wppaAjaxComment failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){jQuery("#wppa-comment-spin-"+t).css("display","none")}}))}function wppaUpdatePhotoNew(a){for(var e=["upn-name","upn-description","upn-tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],p="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<e.length;)void 0!==jQuery("#"+e[t]).val()&&(p+="&"+e[t]+"="+jQuery("#"+e[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:p,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,e,p){0<a.length&&alert(a)},error:function(a,e,p){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,o){var e;wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,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,p){var t=a.split("|");document.getElementById(o).src=t[0],jQuery(o).attr("title",t[1]),wppaConsoleLog("wppaAjaxSetQrCodeSrc put "+a+" into "+o)},error:function(a,e,p){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+p+", status = "+e,"force")}}))}function wppaAjaxNotify(a,e){var p=jQuery(a).prop("checked")?"on":"off",t="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+e+"&onoff="+p;jQuery.ajax({url:wppaAjaxUrl,data:t,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxNotify failed. Error = "+p+", status = "+e,"force")}})}wppaConsoleLog("wppa-ajax-front.js version "+wppaJsAjaxVersion+" loaded.","force");
1
+ var wppaJsAjaxVersion="7.4.01",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(o,a,r,e,p,t){0<parseInt(p)&&p!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+o+", '"+a+"', '"+r+"', '"+e+"', "+p+" )",100):(wppaRenderAdd=e,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[o]&&(a+="&resp=1"),t&&_wppaCurIdx[o]&&_wppaId[o][_wppaCurIdx[o]]&&(a+="&wppa-hilite="+_wppaId[o][_wppaCurIdx[o]]),wppaCanAjaxRender||!r?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[o]&&_wppaStop(o),jQuery("#wppa-ajax-spin-"+o).fadeIn()},success:function(a,e,p){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+o+"-end"):wppaRenderModal&&r?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(o)})):(jQuery("#wppa-container-"+o).html(a),jQuery("#wppa-button-hide-"+o).show()),wppaCanPushState&&wppaUpdateAddressLine&&r){wppaHis++,r=r.split("&amp;").join("&");try{history.pushState({page:wppaHis,occur:o,type:"html",html:a},"",r)}catch(a){try{history.replaceState({page:wppaHis,occur:o,type:"html"},"",r)}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=o)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(r),wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},error:function(a,e,p){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+p+", status = "+e,"force"),document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},complete:function(a,e,p){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+o).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+o).stop().fadeOut(),_wppaLazyDone[o]=!1,_wppaLazyDone[0]=!1,window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhotoFromZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=removefromzip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-rem-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-rem-"+r+"-"+o).prop("disabled",!0),jQuery("#admin-choice-rem-"+r+"-"+o).css("text-decoration","")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhotoFromZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,e,p){document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRequestInfo(a,e,p){dialogHtml="<h3>"+wppaRequestInfoDialogText+'</h3><textarea id="wppa-request-info-text-'+a+'" style="width:98%;" ></textarea><div style="clear:both;" ></div><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Send" onclick="wppaAjaxRequestInfoSend( '+a+", "+e+", "+p+' )" /><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Cancel" onclick="jQuery( \'#wppa-modal-container-'+a+"' ).dialog( 'close' );\" /><div style=\"clear:both;\" ></div>";var t={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(dialogHtml).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}function wppaAjaxRequestInfoSend(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r+"&emailtext="+jQuery("#wppa-request-info-text-"+o).val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#request-info-"+r+"-"+o).val(t[1]),jQuery("#request-info-"+r+"-"+o).prop("disabled",!0),jQuery("#wppa-modal-container-"+o).dialog("close")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRequestInfoSend failed. Error = "+p+", status = "+e,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),p="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){var e;"classic"==wppaUploadEdit&&((r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>"),e='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+p+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>',r.document.write(e),r.document.write("</head>"),r.document.write("<body>"))},success:function(a,e,p){var t;"classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit&&(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"))},error:function(a,e,p){"classic"==wppaUploadEdit&&r.document.write(e+" "+p),wppaConsoleLog("wppaEditPhoto failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,e,p,t){for(var o,r,n=jQuery("."+a),i=[],c=jQuery("#"+p).val(),u=0,s=0;u<n.length;)n[u].selected&&(i[s]=n[u].value,s++),u++;""!=(o=jQuery("#"+e).val())&&(i[s]=o),r=i.join(),""==o&&""==p||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,e,p){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,e,p){jQuery("#"+t).html('<span style="color:red" >'+p+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDestroyAlbum(a,e){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+e,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+p+", status = "+e,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,e,p){},error:function(a,e,p){wppaConsoleLog("_bumpClickCount failed. Error = "+p+", status = "+e,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){wppaPhotoView[t]=!0},error:function(a,e,p){wppaConsoleLog("_bumpViewCount failed. Error = "+p+", status = "+e,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,e,p){wppaConsoleLog("wppaVoteThumb failed. Error = "+p+", status = "+e,"force")}})}function _wppaRateIt(r,e){var a,p,t;0!=e&&(_wppaSSRuns[r]||(a=_wppaId[r][_wppaCurIdx[r]],p=_wppaMyr[r][_wppaCurIdx[r]],0<(t=_wppaWaitTexts[r][_wppaCurIdx[r]]).length?alert(t):0!=p&&wppaRatingOnce||p<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+e+"&wppa-rating-id="+a+"&wppa-occur="+r+"&wppa-index="+_wppaCurIdx[r]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+r+"-"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+r+"-"+e).stop().fadeTo(100,1),jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t,o=a.split("||");0==o[0]?900==o[1]?(alert(o[2]),_wppaSetRatingDisplay(r)):alert("Error Code="+o[1]+"\n\n"+o[2]):(o[7]&&"likes"==o[7]?(t=o[4].split("|"),jQuery("#wppa-like-"+r).attr("title",t[0]),jQuery("#wppa-liketext-"+r).html(t[1]),"1"==o[3]?jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4]):(_wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4],_wppaDisc[o[0]][o[2]]=o[5],_wppaSetRatingDisplay(r),wppaCommentRequiredAfterVote&&0==o[6]&&alert(o[7])),wppaNextOnCallback&&_wppaNextOnCallback(r))},error:function(a,e,p){wppaConsoleLog("_wppaRateIt failed. Error = "+p+", status = "+e,"force")}}))))}function _wppaOvlRateIt(r,n,i,c){0!=n&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+n+"&wppa-rating-id="+r+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+i+"-"+n).stop().fadeTo(100,1),jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){var o=t[4].split("|");return jQuery("#wppa-like-0").attr("title",o[0]),jQuery("#wppa-liketext-0").html(o[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+r+"-"+i).attr("title",o[0]),jQuery("#wppa-liketext-"+r+"-"+i).html(o[1]),void("1"==t[3]?jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbup.png"))}if(_wppaSetRd(i,t[4],".wppa-avg-"),_wppaSetRd(i,t[3],".wppa-rate-"),c)return;wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,e,p){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxMakeOrigName(a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+e+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,e,p){var t=a.split("||");"0"==t[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.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,e,p){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,e,p){var t=a.split("||"),o=t[0],r=t[1],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,e,p){alert("An error occurred:\n"+p+"\nPlease try again")},complete:function(a,e,p){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){var e;_wppaValidateComment(t,a)&&(e="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t,void 0!==jQuery("#wppa-comemail-"+t).val()&&(e+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(e+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(e+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(e+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:e,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,e,p){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,e,p){wppaConsoleLog("wppaAjaxComment failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){jQuery("#wppa-comment-spin-"+t).css("display","none")}}))}function wppaUpdatePhotoNew(a){for(var e=["upn-name","upn-description","upn-tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],p="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<e.length;)void 0!==jQuery("#"+e[t]).val()&&(p+="&"+e[t]+"="+jQuery("#"+e[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:p,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,e,p){0<a.length&&alert(a)},error:function(a,e,p){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,o){var e;wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,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,p){var t=a.split("|");document.getElementById(o).src=t[0],jQuery(o).attr("title",t[1])},error:function(a,e,p){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+p+", status = "+e,"force")}}))}function wppaAjaxNotify(a,e){var p=jQuery(a).prop("checked")?"on":"off",t="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+e+"&onoff="+p;jQuery.ajax({url:wppaAjaxUrl,data:t,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxNotify failed. Error = "+p+", status = "+e,"force")}})}
js/wppa-all.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // wppa-utils
2
+ var wppaDebug,wppaJsUtilsVersion="7.5.03";function wppaAnimate(e,a,t,p,r){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css(a),r&&setTimeout(r,10)):jQuery(e).stop().animate(a,t,p,r)}function wppaFadeIn(e,a,t){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:""}),t&&setTimeout(t,10)):jQuery(e).stop().fadeIn(a,t)}function wppaFadeOut(e,a,t){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"none"}),t&&setTimeout(t,10)):jQuery(e).stop().fadeOut(a,t)}function wppaFadeTo(e,a,t,p){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"",opacity:t}),p&&setTimeout(p,10)):jQuery(e).stop().fadeTo(a,t,p)}function wppaTrim(e,a){var t=wppaTrimLeft(e,a);return t=wppaTrimRight(t,a)}function wppaTrimLeft(e,a){var t,p,r,n,i,o,s;switch(typeof a){case"string":for(p=(t=e).length,r=a.length;r<=p&&t.substr(0,r)==a;)p=(t=t.substr(r)).length;break;case"object":for(i=!1,s=e;!i;){for(n=0,o=s;n<a.length;)s=wppaTrimLeft(s,a[n]),n++;i=o==s}t=s;break;default:return e.replace(/^\s\s*/,"")}return t}function wppaTrimRight(e,a){var t,p,r,n,i,o,s;switch(typeof a){case"string":for(p=(t=e).length,r=a.length;r<=p&&t.substr(p-r)==a;)p=(t=t.substr(0,p-r)).length;break;case"object":for(i=!1,s=e;!i;){for(n=0,o=s;n<a.length;)s=wppaTrimRight(s,a[n]),n++;i=o==s}t=s;break;default:return e.replace(/\s\s*$/,"")}return t}function wppa_setCookie(e,a,t){var p=new Date;p.setDate(p.getDate()+t);var r=escape(a)+(null==t?"":"; expires="+p.toUTCString());document.cookie=e+"="+r}function wppa_getCookie(e){for(var a,t,p=document.cookie.split(";"),r=0;r<p.length;r++)if(a=p[r].substr(0,p[r].indexOf("=")),t=p[r].substr(p[r].indexOf("=")+1),(a=a.replace(/^\s+|\s+$/g,""))==e)return unescape(t);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,a){var t,p,r,n;"undefined"==typeof console||!wppaDebug&&"force"!=a||(t=(new Date).getTime()%864e5,t-=60*(p=Math.floor(t/36e5))*60*1e3,t-=60*(r=Math.floor(t/6e4))*1e3,n=Math.floor(t/1e3),console.log("At: "+p+":"+r+":"+n+"."+(t-=1e3*n)+" message: "+e))}function wppaSvgHtml(e,a,t,p,r,n,i,o){var s,l;switch(r=r||"0",n=n||"10",i=i||"20",o=o||"50",wppaSvgCornerStyle){case"gif":case"none":radius=r;break;case"light":radius=n;break;case"medium":radius=i;break;case"heavy":radius=o}a=a||"32px",l=t?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor);var c='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;'+(a?"height:"+a+";":"")+"fill:"+s+";background-color:"+l+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":c+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":c+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":c+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":c+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":c+='<path d="M30,0H0V30H30V0z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-11C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h11C20.8,9,21,9.2,21,9.5V20.5z"/>';break;case"Exit":c+='<path d="M30 24.398l-8.406-8.398 8.406-8.398-5.602-5.602-8.398 8.402-8.402-8.402-5.598 5.602 8.398 8.398-8.398 8.398 5.598 5.602 8.402-8.402 8.398 8.402z"></path>';break;case"Exit-2":c+='<path d="M30,0H0V30H30V0z M9 4 L15 10 L21 4 L26 9 L20 15 L26 21 L21 26 L15 20 L9 26 L4 21 L10 15 L4 9Z" />';break;case"Full-Screen":c+='<path d="M27.414 24.586l-4.586-4.586-2.828 2.828 4.586 4.586-4.586 4.586h12v-12zM12 0h-12v12l4.586-4.586 4.543 4.539 2.828-2.828-4.543-4.539zM12 22.828l-2.828-2.828-4.586 4.586-4.586-4.586v12h12l-4.586-4.586zM32 0h-12l4.586 4.586-4.543 4.539 2.828 2.828 4.543-4.539 4.586 4.586z"></path>';break;case"Full-Screen-2":c+='<path d="M30,0H0V30H30V0z M4 4 L12 4 L10 6 L14 10 L10 14 L6 10 L4 12Z M18 4 L26 4 L26 12 L24 10 L20 14 L16 10 L20 6Z M26 26 L18 26 L20 24 L16 20 L20 16 L24 20 L26 18Z M4 26 L4 18 L6 20 L10 16 L14 20 L10 24 L12 26Z" />';break;case"Exit-Full-Screen":c+='<path d="M24.586 27.414l4.586 4.586 2.828-2.828-4.586-4.586 4.586-4.586h-12v12zM0 12h12v-12l-4.586 4.586-4.539-4.543-2.828 2.828 4.539 4.543zM0 29.172l2.828 2.828 4.586-4.586 4.586 4.586v-12h-12l4.586 4.586zM20 12h12l-4.586-4.586 4.547-4.543-2.828-2.828-4.547 4.543-4.586-4.586z"></path>';break;case"Exit-Full-Screen-2":c+='<path d="M30,0H0V30H30V0z M17 17 L25 17 L23 19 L27 23 L23 27 L19 23 L17 25Z M5 17 L13 17 L13 25 L11 23 L7 27 L3 23 L7 19Z M13 13 L5 13 L7 11 L3 7 L7 3 L11 7 L13 5Z M17 13 L17 5 L19 7 L23 3 L27 7 L23 11 L25 13Z" />';break;default:c+='<path d="M30,0H0V30H30V0z" />'}return c+="</g></svg>"}var wppaLastLazy=0;function wppaMakeLazyVisible(e,a){var t,p,r,n;wppaInitMasonryPlus(),"number"!=typeof e&&(e=0),_wppaLazyDone[e]||((t=new Date).getTime()<wppaLastLazy+250||((r=0)<e?(jQuery(".wppa-lazy-"+e).each(function(){(p=jQuery(this).attr("data-src"))?wppaLazyLoad&&!wppaIsElementInViewport(this,a)||(jQuery(this).attr("src",p),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"),jQuery(this).removeClass("wppa-lazy-"+e),r++):wppaIsElementInViewport(this)&&jQuery(this).removeClass("wppa-lazy-"+e),0}),0==jQuery(".wppa-lazy-"+e).length&&(_wppaLazyDone[e]=!0),wppaInitMasonryPlus(e)):(jQuery(".wppa-lazy").each(function(){(p=jQuery(this).attr("data-src"))&&(wppaLazyLoad&&!wppaIsElementInViewport(this)||(jQuery(this).attr("src",p),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"),r++)),0}),0==jQuery(".wppa-lazy").length&&(_wppaLazyDone[0]=!0),wppaInitMasonryPlus()),n=t.getTime(),wppaLastLazy=n,0<r&&(setTimeout("wppaMakeLazyVisible("+e+")",500),wppaInitMasonryPlus())))}function wppaIsElementInViewport(e,a){"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);var t,p=e.getBoundingClientRect();return!p||(t=wppaWindowWidth(),a&&(t*=3),0<p.bottom&&0<p.right&&p.left<t&&p.top<wppaWindowHeight())}function wppaSizeArea(){0<wppaAreaMaxFrac&&wppaAreaMaxFrac<1&&(jQuery(".wppa-thumb-area").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac),jQuery(".albumlist").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac))}function wppaIconSize(e,a,t){var p=t?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==p?a:(wppaIsMini[e]?p/2:p)+"px;"}function wppaEntityDecode(e){var a=e;return a=(a=(a=(a=(a=a.split("&amp;").join("&")).split("&gt;").join(">")).split("&lt;").join("<")).split("&quot;").join('"')).split("&#39;").join("'")}function wppaSetMaxWidthToParentWidth(e){var a=e.parentNode.clientWidth;jQuery(e).css({maxWidth:a})}function wppaWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function wppaWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}
3
+ // wppa
4
+ var wppaJsVersion="7.5.03",wppaIsChrome=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime),wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth,wppaAutoColumnWidth=wppaAutoColumnWidth||[],wppaAutoColumnFrac,wppaAutoColumnFrac=wppaAutoColumnFrac||[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth,wppaColWidth=wppaColWidth||[],wppaMCRWidth,wppaMCRWidth=wppaMCRWidth||[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,wppaThumbAspect=.75,wppaFilmonlyContinuous=!1,wppaNoAnimateOnMobile=!1,wppaAjaxScroll=!0,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=200,wppaArtmonkeyFileNotSource=!1,wppaRequestInfoDialogText="Please specify your question",_wppaId=[],_wppaRealId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],_wppaLastIdx=[],_wppaLazyDone=[],_wppaStopping=[],_wppaFilename=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaThumbSize=100,wppaTfMargin=4,wppaZoomableData=[],wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeEndTimer,wppaScrollEndTimer;function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",wppaMakeLazyVisible),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaInitMasonryPlus),jQuery(window).on("resize",function(){for(var p=1;p<=wppaTopMoc;)wppaFilmInit[p]=!1,jQuery("#wppa-filmstrip-"+p).stop(),_wppaAdjustFilmstrip(p),p++}),jQuery(window).on("wpparesizeend",function(){for(var p=1;p<=wppaTopMoc;)wppaFilmInit[p]=!0,p++}),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){setTimeout(function(){jQuery(".wppa-thumb-area").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery(".albumlist").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery(".wppa-div").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery("body").getNiceScroll&&jQuery("body").getNiceScroll().resize()},2e3)}),jQuery(window).trigger("resize"),wppaProtect()}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}function wppaDoAllAutocols(p){setTimeout(function(){_wppaDoAllAutocols(-1)},wppaExtendedResizeDelay)}function _wppaDoAllAutocols(p){for(var e=1;e<=wppaAutoColumnWidth.length;)wppaAutoColumnWidth[e]&&_wppaDoAutocol(e,p),wppaMakeLazyVisible(e),e++;return(p<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(p)},wppaExtendedResizeDelay),!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p),a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t,o,r,i,n,s=jQuery("#wppa-container-"+p).width();if(document.getElementById("wppa-container-"+p)){if(wppaCoverImageResponsive[p]||1<(a=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(a[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:s-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:s})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:s},wppaResponseSpeed))),1<(a=jQuery(".wppa-cover-box-mcr-"+p)).length){var w=document.getElementById("wppa-albumlist-"+p).clientWidth,l=parseInt((w+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,u=l-1,c=parseInt((w+wppaCoverSpacing)/l-wppaCoverSpacing);if(wppaColWidth[p]!=w||wppaMCRWidth[p]!=c){wppaColWidth[p]=w,wppaMCRWidth[p]=c;for(var d=0;d<a.length;){switch(d%l){case 0:jQuery(a[d]).css({marginLeft:"0px",clear:"both",float:"left"});break;case u:jQuery(a[d]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(a[d]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}d++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:c-wppaTextFrameDelta},wppaResponseSpeed),jQuery(a[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:c},wppaResponseSpeed)}}else{1==a.length&&(wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})))}0<jQuery(".wppa-album-cover-grid-"+p).length&&(jQuery("#wppa-container-"+p).css("line-height","0"),(t=parseInt(s/wppaMaxCoverWidth+.9999))<1&&(t=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/t+"%"})),!wppaThumbSpaceAuto||(o=parseInt(jQuery(".thumbnail-frame-"+p).css("width")))&&(r=s-wppaThumbnailAreaDelta-7,i=Math.max(1,parseInt(r/(o+wppaMinThumbSpace))),n=parseInt(.5+(r-i*o)/(i+1)),jQuery(".thumbnail-frame-"+p).css({marginLeft:n})),jQuery(".thumbnail-frame-comalt-"+p).css("width",s-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",s-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var y,m=1,h=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");h;)y=h*(s-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+m+"-"+p).css("height",y),m++,h=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",s-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*s),wppaFilmStripLength[p]=s-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",s),jQuery(".wppa-simg-"+p).css("width",s-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",s+10),jQuery(".wppa-mimg-"+p).css("width",s),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(s/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*s),wppaSetRealCalendarHeights(p),!0}}function wppaSetRealCalendarHeights(e){var a,t,p,o,r,i=jQuery("#wppa-real-calendar-"+e).width();0<i&&(a=!0,t=i*wppaThumbAspect/7,jQuery(".wppa-real-calendar-day-"+e).css({height:t}),p=i/50+2,jQuery("#wppa-real-calendar-"+e).css({fontSize:p}),o=p/4,jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:o,marginBottom:o}),r=t/2,jQuery(".wppa-realcalimg-"+e).each(function(){var p;0==this.height?a=!1:(p=jQuery(this).attr("data-day"),thisb=r-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb}))}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100))}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:r})}}}function wppaGetChildI(p){for(var e=p.childNodes,a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace(/&quot;/g,'"').replace('"]','">').replace("[/a]","</a>").replace("[img","<img").replace("/]","/>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+e).html(p.state.html);break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e&&(a=document.location.href.split("&wppa-occur="),e=parseInt(a[1]));var a=document.location.href.split("&wppa-photo="),t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy||("undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,e){var a,t;document.selection?(p.focus(),sel=document.selection.createRange(),sel.text=e):p.selectionStart||"0"==p.selectionStart?(a=p.selectionStart,t=p.selectionEnd,p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length):p.value+=e}function wppaGeoInit(p,e,a){var t=new google.maps.LatLng(e,a),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:t},r=new google.maps.Map(document.getElementById("map-canvas-"+p),o),i=new google.maps.Marker({position:t,map:r,title:""});google.maps.event.addListener(r,"center_changed",function(){window.setTimeout(function(){r.panTo(i.getPosition())},1e3)})}function wppaEncode(p){if(void 0!==p){for(var e=(t=(t=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,t="";a<e.length;)t+=e[a],++a<e.length&&(t+="||PLUS||");return t}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var a,t=jQuery("#wppa-ss-pa-"+p).val(),o="",r="",i="";switch(t){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),o=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var n=jQuery(".wppa-ss-albumcat-"+p),i="";for(s=0;s<n.length;s++)jQuery(n[s]).prop("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(i=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");n=jQuery(".wppa-ss-albumtext-"+p);for(i="",s=0;s<n.length;s++)jQuery(n[s]).prop("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),o=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(i=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(i=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");n=jQuery(".wppa-ss-phototag-"+p);for(i="",s=0;s<n.length;s++)jQuery(n[s]).prop("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var s,n=jQuery(".wppa-ss-phototext-"+p);for(i="",s=0;s<n.length;s++)jQuery(n[s]).prop("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(r=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<r.length&&(r=r.replace("#","H")),""!=r&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=r?(wppaAjaxGetSsIptcList(p,r,"wppa-ss-iptcopts-"+p),wppaLastIptc=r):null!=(i=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=i&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(r=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<r.length&&(r=r.replace("#","H")),""!=r&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=r?(wppaAjaxGetSsExifList(p,r,"wppa-ss-exifopts-"+p),wppaLastExif=r):null!=(i=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=i&&jQuery("#wppa-ss-button-"+p).css("display","")))}}e&&(-1==(a=jQuery("#wppa-ss-pageurl-"+p).val()).indexOf("?")?a+="?":a+="&",a+="occur=1&wppa-supersearch="+t+","+o+","+r+","+i,document.location.href=a)}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,e){var a=jQuery(p).length;6<a&&(a=6),a<2&&(a=2),jQuery(e).attr("size",a)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).prop("disabled",!0),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,e,a,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}function wppaInitMasonryPlus(p){for(var e,a,t,o=0<parseInt(p)?e=p:(e=1,wppaTopMoc),r=e;r<=o;){document.getElementById("grid-"+r)&&(t=(a=jQuery("#wppa-container-"+r).width()-wppaThumbnailAreaDelta)/parseInt((a+wppaTfMargin)/(.75*wppaThumbSize+wppaTfMargin))-wppaTfMargin,jQuery(".grid-item").css("visibility","visible"),jQuery(".grid-item-"+r).css("width",t+"px"),jQuery("#grid-"+r).masonry({itemSelector:".grid-item-"+r,columnWidth:t,gutter:wppaTfMargin,fitWidth:!0})),r++}}
5
+ // wppa-slideshow
6
+ var wppaJsSlideshowVersion="7.5.03";function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,l,s,d,u,_,m,c,h,y,S,g,x,f,I,j,Q,b,v,N,T,C,k,R,F){var M,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"==S?_wppaTimeOut[p]="random":0<parseInt(S)?_wppaTimeOut[p]=parseInt(S):_wppaTimeOut[p]=wppaSlideShowTimeOut,_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[p]=[],_wppaRealId[p]=[],_wppaAvg[p]=[],_wppaDisc[p]=[],_wppaMyr[p]=[],_wppaVRU[p]=[],_wppaLinkUrl[p]=[],_wppaLinkTitle[p]=[],_wppaLinkTarget[p]=[],_wppaCommentHtml[p]=[],_wppaIptcHtml[p]=[],_wppaExifHtml[p]=[],_wppaUrl[p]=[],_wppaSkipRated[p]=!1,_wppaLbTitle[p]=[],_wppaDidGoto[p]=!1,wppaSlidePause[p]=!1,_wppaShareUrl[p]=[],_wppaShareHtml[p]=[],_wppaFilmNoMove[p]=!1,_wppaHiresUrl[p]=[],_wppaIsVideo[p]=[],_wppaVideoHtml[p]=[],_wppaAudioHtml[p]=[],_wppaVideoNatWidth[p]=[],_wppaVideoNatHeight[p]=[],wppaVideoPlaying[p]=!1,wppaAudioPlaying[p]=!1,_wppaWaitTexts[p]=[],_wppaImageAlt[p]=[],_wppaFilename[p]=[]),M="default",""!=c?M="pointer":""!=wppaLightBox[p]&&(M="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=N,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+k+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&""==wppaLightBox[p]&&(_wppaSlides[p][a]+=" autoplay "),0<R.length&&(_wppaSlides[p][a]+=' poster="'+R+'" ')):_wppaSlides[p][a]=' src="'+e+'" alt="'+k+'" class="theimg theimg-'+p+' big stereo" ',wppaSlideSwipe&&(_wppaSlides[p][a]+=' ontouchstart="wppaTouchStart( event, this.id, '+p+' );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" '),wppaAutoColumnWidth[p]||(_wppaSlides[p][a]+='width="'+i+'" height="'+w+'" '),_wppaIsVideo[p][a]?(L="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+M+'; display:none;" '+L+">"+N+"</video>"):_wppaSlides[p][a]+='style="'+t+"; cursor:"+M+'; display:none; vertical-align:middle;">',_wppaFullNames[p][a]=wppaRepairBrTags(r),_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=b,_wppaId[p][a]=l,_wppaRealId[p][a]=s,_wppaAvg[p][a]=d,_wppaDisc[p][a]=u,_wppaMyr[p][a]=_,_wppaVRU[p][a]=m,_wppaLinkUrl[p][a]=c,_wppaLinkTitle[p][a]=h,""!=y?_wppaLinkTarget[p][a]=y:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=g,_wppaIptcHtml[p][a]=x,_wppaExifHtml[p][a]=f,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(I),_wppaShareUrl[p][a]=j,_wppaShareHtml[p][a]=wppaRepairScriptTags(Q),_wppaHiresUrl[p][a]=v,_wppaVideoHtml[p][a]=N,_wppaAudioHtml[p][a]=T,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=C,_wppaImageAlt[p][a]=k,_wppaFilename[p][a]=F}function wppaSpeed(p,a){_wppaSSRuns[p]&&_wppaSpeed(p,a)}function wppaStopShow(p){_wppaSSRuns[p]&&_wppaStop(p)}function wppaStartStop(p,a){_wppaIsBusy[p]?_wppaTP[p]=a:(_wppaSSRuns[p]?(_wppaStop(p),jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))):(_wppaStart(p,a),-1==a&&jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Pause-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))),wppaIsMobile&&(jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(10,1).fadeTo(3e3,0),jQuery(".ubb-"+p).stop().fadeTo(10,1).fadeTo(3e3,0)))}function wppaBbb(p,a,e){_wppaSSRuns[p]||_wppaBbb(p,a,e)}function wppaUbb(p,a,e){_wppaUbb(p,a,e)}function wppaRateIt(p,a){_wppaRateIt(p,a)}function wppaOvlRateIt(p,a,e,t){_wppaOvlRateIt(p,a,e,t)}function wppaPrev(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrev(p)}function wppaPrevN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrevN(p,a)}function wppaFirst(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,0)}function wppaNext(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNext(p)}function wppaNextN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNextN(p,a)}function wppaLast(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,_wppaSlides[p].length-1)}function wppaFollowMe(p,a){_wppaSSRuns[p]||_wppaFollowMe(p,a)}function wppaLeaveMe(p,a){_wppaSSRuns[p]||_wppaLeaveMe(p,a)}function wppaGoto(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,a)}function wppaGotoFilmNoMove(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||(_wppaFilmNoMove[p]=!0,_wppaGoto(p,a))}function wppaGotoKeepState(p,a){_wppaNxtIdx[p]!=a&&(_wppaDidGoto[p]=!0,_wppaGotoKeepState(p,a))}function _wppaGotoKeepState(p,a){(_wppaSSRuns[p]?_wppaGotoRunning:_wppaGoto)(p,a)}function wppaGotoRunning(p,a){_wppaDidGoto[p]=!0,_wppaGotoRunning(p,a)}function wppaValidateComment(p){return _wppaValidateComment(p)}function _wppaNextSlide(p,a){if(_wppaStopping[p])_wppaStopping[p]=0;else{if(_wppaLastIdx[p]=_wppaCurIdx[p],!document.getElementById("slide_frame-"+p)&&document.getElementById("filmwindow-"+p)&&wppaFilmonlyContinuous)return _wppaSSRuns[p]?(_wppaCurIdx[p]++,_wppaCurIdx[p]==_wppaSlides[p].length&&(_wppaCurIdx[p]=0),_wppaAdjustFilmstrip(p,"linear"),_wppaNxtIdx[p]=_wppaCurIdx[p],void setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",wppaAnimationSpeed)):(_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFilmInit[p]=!1,void _wppaAdjustFilmstrip(p,"linear"));if(document.getElementById("slide_frame-"+p)||document.getElementById("filmwindow-"+p)){var e,t,i=_wppaFg[p],w=1-i;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"+i+"-"+p).attr("title",wppaSlidePause[p]),jQuery("#slide_frame-"+p).attr("title",wppaSlidePause[p]),void setTimeout("_wppaNextSlide( "+p+', "auto" )',250)}else jQuery("#slide_frame-"+p).removeAttr("title");if((_wppaSSRuns[p]||"auto"!=a)&&_wppaSlides[p]&&(!(_wppaSlides[p].length<2)||_wppaFirst[p])){if(_wppaSSRuns[p]||"reset"!=a||(_wppaSSRuns[p]=!0,__wppaOverruleRun=!1),_wppaVoteInProgress=!1,_wppaIsBusy[p]=!0,_wppaSSRuns[p]&&_wppaShowMetaData(p,"hide"),_wppaSSRuns[p]&&(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0)),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaCurIdx[p]]).css({display:"none"}),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaNxtIdx[p]]).css({display:""}),"undefined"!=typeof _wppaLat&&_wppaLat[p]?(e=_wppaRealId[p],_wppaLat[p][e[_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][e[_wppaNxtIdx[p]]],_wppaLon[p][e[_wppaNxtIdx[p]]])):jQuery("#map-canvas-"+p).css("display","none")):jQuery("#map-canvas-"+p).css("display","none"),jQuery("[id^=wppa-numbar-"+p+"-]").css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar}),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive}),_wppaSlides[p].length>wppaNumbarMax){var r,o,n=_wppaSlides[p].length-1,l=_wppaNxtIdx[p],s=(wppaNumbarMax-1)/2;l<s?(r=0,o=wppaNumbarMax-1-1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):n-s<l?(r=(o=n)-wppaNumbarMax+1+1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(o=l+s+.5-1,(r=l-s+1)<2?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):n-1<o?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})));for(var d=0;d<_wppaSlides[p].length;)0!=d&&d!=n&&(d<r||o<d)?jQuery("#wppa-numbar-"+p+"-"+d).css({display:"none"}):jQuery("#wppa-numbar-"+p+"-"+d).css({display:"block"}),d++}_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?(t=wppaIconSize(p,"1.5em",!1),jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button",t,!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button",t,!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,w,_wppaNxtIdx[p]),_wppaLoadSpinner(p),_wppaFirst[p]=!1,_wppaCheckRewind(p),setTimeout("_wppaNextSlide_2( "+p+" )",10)}}}}}function _wppaNextSlide_2(p){var a=_wppaFg[p],e=1-a,t=document.getElementById("theimg"+e+"-"+p);!t||1!=t.nodeType||"IMG"!=t.nodeName||t.complete?(wppaUpdateLightboxes(),_wppaUnloadSpinner(p),-1!=_wppaSSRuns[p]&&(_wppaToTheSame||_wppaShowMetaData(p,"hide")),_wppaFg[p]=1-_wppaFg[p],e=1-(a=_wppaFg[p]),setTimeout("_wppaNextSlide_3( "+p+" )",10)):setTimeout("_wppaNextSlide_2( "+p+" )",200)}function _wppaNextSlide_3(p){var a=_wppaFg[p],e=1-a,t=_wppaCurIdx[p],i=_wppaNxtIdx[p],w="#theslide"+e+"-"+p,r="#theslide"+a+"-"+p,o="#theimg"+e+"-"+p,n="#theimg"+a+"-"+p,l=parseInt(jQuery(w).css("width")),s=t==i+1?"right":t==i-1?"left":t==i?"none":"nil";switch(t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(s="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(s="right"),"nil"==s&&(s=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:l}),jQuery(r).css({marginLeft:0,width:l}),wppaFormatSlide(p),wppaAnimationType){case"fadeafter":wppaFadeOut(o,wppaAnimationSpeed),setTimeout(wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p)),wppaAnimationSpeed);break;case"swipe":switch(s){case"left":wppaAnimate(w,{marginLeft:-l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:l+"px"}),wppaFadeIn(n,10),wppaAnimate(r,{marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).wppaAnimate({marginLeft:l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-l+"px"}),wppaFadeIn(n,10),jQuery(r).wppaAnimate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":wppaFadeIn(n,10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:wppaFadeOut(o,wppaAnimationSpeed),wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p))}}function _wppaNextSlide_4(p){var a=_wppaFg[p],e="#theslide"+a+"-"+p;jQuery("#theslide"+(1-a)+"-"+p).css({zIndex:80}),jQuery(e).css({zIndex:81}),_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFormatSlide(p),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length):jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length),jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),_wppaAdjustFilmstrip(p),_wppaSetRatingDisplay(p),setTimeout("_wppaNextSlide_5( "+p+" )",_wppaTextDelay)}function _wppaNextSlide_5(p){var a,e,t,i,w,r,o;if(_wppaToTheSame||(a=_wppaDsc[p][_wppaCurIdx[p]],jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty&&(""==(e=_wppaDsc[p][_wppaCurIdx[p]])||"&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]])),_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 n=_wppaTP[p];return _wppaTP[p]=-2,_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p,"next_5"),void wppaStartStop(p,n)}wppaUpdateLightboxes(),wppaIsMini[p]||(t=_wppaShareUrl[p][_wppaCurIdx[p]],"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),1<_wppaSlides[p].length&&wppaPushStateSlide(p,_wppaCurIdx[p],t)),_wppaSSRuns[p]?_wppaCurIdx[p]+1==_wppaSlides[p].length?(i=jQuery("#wppa-next-pagelink-"+p),w=jQuery("#wppa-first-pagelink-"+p),0<i.length&&"hidden"!=jQuery(i).css("visibility")?setTimeout(function(){jQuery("#wppa-next-pagelink-"+p).trigger("click")},wppaGetSlideshowTimeout(p)):0<w.length&&setTimeout(function(){jQuery(w).trigger("click")},wppaGetSlideshowTimeout(p))):setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p)):_wppaStopping[p]=!1,jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),wppaStopAudio(p),!wppaSlideAudioStart||0<(r=jQuery(".wppa-audio-"+_wppaId[p][_wppaCurIdx[p]]+"-"+p)).length&&((o=r[r.length-1])&&(wppaAudioPlaying[p]||o.play())),wppaProtect()}function wppaFormatSlide(p){var a="theimg"+_wppaFg[p]+"-"+p,e=document.getElementById(a);if(e){var t="theslide"+_wppaFg[p]+"-"+p,i="slide_frame-"+p,w=jQuery("#wppa-container-"+p).width();wppaColWidth[p]=w;var r=jQuery(".wppa-audio-"+p),o=e.naturalWidth;void 0===o&&(o=parseInt(e.style.maxWidth));var n=e.naturalHeight;void 0===n&&(n=parseInt(e.style.maxHeight));var l=wppaAspectRatio[p],s=wppaFullSize[p],d=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var c,h,y,S,g,x,f,I,j=wppaStretch;if(u)c=w-d,S=y=0,f=g=w,I=x=(h=parseInt(c*n/o))+d,jQuery("#"+i).css({width:f,height:I}),jQuery("#"+t).css({width:g,height:x}),jQuery("#"+a).css({width:c,height:h});else{if(s<(f=w)&&(f=s),g=f,x=I=parseInt(f*l),j||f-d<=o||I-d<=n?l<(n+d)/(o+d)?(h=I-d,c=parseInt(h*o/n)):(c=f-d,h=parseInt(c*n/o)):(c=o,h=n),"default"!=_&&"none"!=_){switch(_){case"top":S=0;break;case"center":S=parseInt((I-(h+d))/2);break;case"bottom":S=I-(h+d);break;case"fit":S=0,x=I=h+d}jQuery("#"+a).css({marginTop:S,marginBottom:0})}if(jQuery("#"+i).css({width:f,height:I}),jQuery("#"+t).css({width:g,height:x}),jQuery("#"+a).css({width:c,height:h}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":y=0;break;case"center":y=parseInt((w-f)/2);break;case"right":y=w-f}y<0&&(y=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+i).css({marginLeft:y})}var Q=jQuery(r).height(),b=(f-c)/2;Q&&0<Q&&(wppaAudioHeight=Q,jQuery(r).css({height:wppaAudioHeight,width:c,left:b}))}var v=parseInt(f/3),N=2*v,T=0<r.length?I-wppaAudioHeight-wppaSlideBorderWidth-S:I;jQuery("#bbb-"+p+"-l").css({height:T,width:v,left:0}),jQuery("#bbb-"+p+"-r").css({height:T,width:v,left:N})}}function wppaMakeNameHtml(p){var a,e,t="";if(_wppaCurIdx[p]<0)return"";if(wppaIsMini[p]||_wppaIsVideo[p][_wppaCurIdx[p]])t=_wppaFullNames[p][_wppaCurIdx[p]];else switch(wppaArtMonkyLink){case"file":case"zip":t=wppaArtMonkeyButton?_wppaFullNames[p][_wppaCurIdx[p]]?(a=-1!=_wppaFullNames[p][_wppaCurIdx[p]].indexOf("plus.png"),e=_wppaFullNames[p][_wppaCurIdx[p]].replace(/(<([^>]+)>)/gi,""),e=a?e.replace(" )"," +)"):e.replace(" )",")"),'<input type="button" title="Download" style="cursor:pointer;margin-bottom:0px;max-width:'+(wppaGetContainerWidth(p)-24)+'px;" class="wppa-download-button" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+'\' );" value="'+wppaDownLoad+": "+e+'" />'):"":wppaArtmonkeyFileNotSource?'<a href="'+_wppaUrl[p][_wppaCurIdx[p]]+'" title="Download" style="cursor:pointer;" download="'+_wppaFilename[p][_wppaCurIdx[p]]+'" >'+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>":'<a title="Download" style="cursor:pointer;" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+"' );\" >"+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>";break;case"none":case"new":t=_wppaFullNames[p][_wppaCurIdx[p]];break;default:t=""}return wppaRepairBrTags(t)}function wppaMakeTheSlideHtml(p,a,e){var t,i,w=_wppaIsVideo[p][e]?"video":"img",r="title";"wppa"==wppaLightBox[p]&&(r="data-lbtitle");var o,n,l=""==wppaLightBox[p]?' onpause="wppaVideoPlaying['+p+'] = false;" onplay="wppaVideoPlaying['+p+'] = true;"':"";if(""!=_wppaLinkUrl[p][e])t=wppaSlideToFullpopup?'<a onclick="wppaStopAudio();wppaStopShow('+p+");"+_wppaLinkUrl[p][e]+'" target="'+_wppaLinkTarget[p][e]+'" title="'+_wppaLinkTitle[p][e]+'"><'+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>":"<a onclick=\"_bumpClickCount('"+_wppaId[p][e]+"');wppaStopAudio();wppaStopShow("+p+");window.open('"+_wppaLinkUrl[p][e]+"', '"+_wppaLinkTarget[p][e]+'\');" title="'+_wppaLinkTitle[p][e]+'"><'+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+w+l+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var s="",d=0,u=wppaLightboxSingle[p]?"":"[slide-"+p+"-"+a+"]";d<e;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),s+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;for(i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][e]:wppaMakeFullsizeUrl(_wppaUrl[p][e]),n=".pdf"==(o=_wppaHiresUrl[p][e]).substr(o.length-4,o.length),s+='<a href="'+i+'" onclick="wppaStopAudio();wppaStopShow('+p+');" style="cursor:pointer;" target="'+_wppaLinkTarget[p][e]+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][e]+'" data-videonatheight="'+_wppaVideoNatHeight[p][e]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][e])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][e])+'"':"")+" "+r+'="'+_wppaLbTitle[p][e]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'">'+(n?"<iframe "+l+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e])+"</a>",d=e+1;d<_wppaUrl[p].length;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),s+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;t=s}""!=_wppaAudioHtml[p][e]&&(t+='<audio controls id="wppa-audio-'+_wppaId[p][e]+"-"+p+'" class="wppa-audio-'+p+" wppa-audio-"+_wppaId[p][e]+"-"+p+'" data-from="wppa" onplay="wppaAudioPlaying['+p+'] = true;" onpause="wppaAudioPlaying['+p+'] = false" style="position:relative;top:-'+(wppaAudioHeight+wppaSlideBorderWidth)+"px;z-index:10;width:"+_wppaVideoNatWidth[p][e]+'px;padding:0;box-sizing:border-box;" >'+_wppaAudioHtml[p][e]+"</audio>"),t=t.replace(/title=""/g,""),jQuery("#theslide"+a+"-"+p).html(t)}function _wppaAdjustFilmstrip(p,a){if(document.getElementById("wppa-filmstrip-"+p)){var e,t,i,w=!document.getElementById("slide_frame-"+p);if(w||jQuery(".wppa-film-"+p).removeClass("wppa-filmthumb-active"),_wppaFilmNoMove[p]&&wppaFilmInit[p]?_wppaFilmNoMove[p]=!1:(e=wppaFilmStripLength[p]/2-(_wppaCurIdx[p]+.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmShowGlue&&(e-=2*wppaFilmStripMargin[p]+2),t=wppaFilmStripLength[p]/2-(.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],i=wppaFilmStripLength[p]/2-(-.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmInit[p]?0==_wppaCurIdx[p]&&_wppaSSRuns[p]&&_wppaLastIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+"px"}),wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:t+"px"},wppaAnimationSpeed,a)):wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},wppaAnimationSpeed,a):(jQuery("#wppa-filmstrip-"+p).css({marginLeft:e+"px"}),setTimeout(function(){wppaFilmInit[p]=!0},200)),_wppaLastIdx[p]=_wppaCurIdx[p]),wppaMakeLazyVisible(p,!0),!w&&-1!=_wppaCurIdx[p]){_wppaCurIdx[p]-10<0&&0,_wppaCurIdx[p]+10>_wppaSlides[p].length&&_wppaSlides[p].length;for(var r=0;r<_wppaSlides[p].length;){jQuery("#film_wppatnf_"+_wppaId[p][r]+"_"+p).html()&&(""!=jQuery("#wppa-film-"+r+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+r+"-"+p).attr("title",jQuery("#wppa-film-"+r+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+r+"-"+p).attr("title",jQuery("#wppa-film-"+r+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==r?(jQuery("#wppa-film-"+r+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+r+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+r+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][r]),jQuery("#wppa-pre-"+r+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][r]))),r++}}w||jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).addClass("wppa-filmthumb-active")}}function _wppaNext(p){if(wppaSlideWrap[p]||_wppaCurIdx[p]!=_wppaSlides[p].length-1)if(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length){var a=jQuery("#wppa-next-pagelink-"+p),e=jQuery("#wppa-first-pagelink-"+p);if(0<a.length&&"hidden"!=jQuery(a).css("visibility"))return void jQuery("#wppa-next-pagelink-"+p).trigger("click");if(0<e.length)return void jQuery(e).trigger("click")}else _wppaNextSlide(p,0)}function _wppaNextN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]>=_wppaSlides[p].length-a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]+a;_wppaNxtIdx[p]>=_wppaSlides[p].length;)_wppaNxtIdx[p]-=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaNextOnCallback(p){if(wppaSlideWrap[p]||_wppaCurIdx[p]!=_wppaSlides[p].length-1){if(_wppaSkipRated[p]){var a=_wppaCurIdx[p]+1;a==_wppaSlides[p].length&&(a=0);var e=a;if(0!=_wppaMyr[p][e]){for(++a==_wppaSlides[p].length&&(a=0);a!=e&&0!=_wppaMyr[p][a];)++a==_wppaSlides[p].length&&(a=0);e=a}_wppaNxtIdx[p]=e}else _wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0);_wppaNextSlide(p,0)}}function _wppaPrev(p){!wppaSlideWrap[p]&&0==_wppaCurIdx[p]||(_wppaNxtIdx[p]=_wppaCurIdx[p]-1,_wppaNxtIdx[p]<0?jQuery("#wppa-prev-page-last-item-"+p).trigger("click"):_wppaNextSlide(p,0))}function _wppaPrevN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]<a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]-a;_wppaNxtIdx[p]<0;)_wppaNxtIdx[p]+=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaGoto(p,a){_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,_wppaNextSlide(p,0)}function _wppaGotoRunning(p,a){_wppaIsBusy[p]?setTimeout("_wppaGotoRunning( "+p+","+a+" )",10):(_wppaSSRuns[p]=!1,_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,__wppaOverruleRun=!0,_wppaNextSlide(p,"manual"),_wppaGotoContinue(p))}function _wppaGotoContinue(p){_wppaIsBusy[p]?setTimeout("_wppaGotoContinue( "+p+" )",10):setTimeout("_wppaNextSlide( "+p+', "reset" )',wppaGetSlideshowTimeout(p)+10)}function _wppaStart(p,a){if(_wppaStopping[p])return _wppaStopping[p]--,void setTimeout(function(){_wppaStart(p,a)},(wppaAnimationSpeed+wppaGetSlideshowTimeout(p))/10);_wppaSSRuns[p]||("icons"==wppaSlideshowNavigationType?_wppaStartIcons:_wppaStartText)(p,a)}function _wppaStartIcons(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}var t=wppaIconSize(p,"1.5em",!1);-1<a?(jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaSvgHtml("Pause-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).show(),jQuery("#speed1-"+p).show(),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStartText(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}-1<a?(jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaStop),jQuery("#speed0-"+p).css("display","inline"),jQuery("#speed1-"+p).css("display","inline"),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStop(p){_wppaStopping[p]=12,("icons"==wppaSlideshowNavigationType?_wppaStopIcons:_wppaStopText)(p)}function _wppaStopIcons(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"1.5em",!1),!1,!0)),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaStopText(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaSpeed(p,a){"random"!=_wppaTimeOut[p]&&(a?500<_wppaTimeOut[p]&&(_wppaTimeOut[p]/=1.5):_wppaTimeOut[p]<6e4&&(_wppaTimeOut[p]*=1.5))}function _wppaLoadSpinner(p){}function _wppaUnloadSpinner(p){jQuery("#wppa-slide-spin-"+p).stop().fadeOut(),setTimeout(function(){jQuery("#wppa-slide-spin-"+p).stop().fadeOut()},1e3)}function _wppaCheckRewind(p){var a,e,t;document.getElementById("wppa-filmstrip-"+p)&&((t=Math.abs(_wppaCurIdx[p]-_wppaNxtIdx[p]))<=wppaFilmPageSize[p]||(1+wppaFilmStripLength[p]/wppaThumbnailPitch[p])/2<=t&&(a=wppaThumbnailPitch[p]*_wppaSlides[p].length,wppaFilmShowGlue&&(a+=2+2*wppaFilmStripMargin[p]),e=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),_wppaNxtIdx[p]>_wppaCurIdx[p]?e-=a:e+=a,jQuery("#wppa-filmstrip-"+p).css("margin-left",e+"px")))}function _wppaSetRatingDisplay(p){if(document.getElementById("wppa-rating-"+p)){var a,e,t,w,r=_wppaAvg[p][_wppaCurIdx[p]];if(void 0!==r){if("likes"==wppaRatingDisplayType){"void"==(w=_wppaMyr[p][_wppaCurIdx[p]])?(jQuery("#wppa-dislike-imgdiv-"+p).hide(),jQuery("#wppa-like-imgdiv-"+p).hide()):(jQuery("#wppa-dislike-imgdiv-"+p).show(),jQuery("#wppa-like-imgdiv-"+p).show());var o=r.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(r=(a=r.split("|"))[0],e=a[1],t=_wppaDisc[p][_wppaCurIdx[p]],w=_wppaMyr[p][_wppaCurIdx[p]],"graphic"==wppaRatingDisplayType)_wppaSetRd(p,r,"#wppa-avg-"),_wppaSetRd(p,w,"#wppa-rate-"),0==w?(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",t));else{if(jQuery("#wppa-numrate-avg-"+p).html(r+" ( "+e+" ) "),jQuery(".wppa-my-rat-"+p).show(),"void"==w)jQuery("#wppa-numrate-mine-"+p).html(""),jQuery(".wppa-my-rat-"+p).hide();else if(wppaRatingOnce&&0<w)jQuery("#wppa-numrate-mine-"+p).html(w);else if(w<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var n="";for(i=1;i<=wppaRatingMax;i++)w==i?n+='<span style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )">&nbsp;'+i+"&nbsp;</span>":(w>i-1&&w<i&&(n+="&nbsp;( "+w+" )&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==w?(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(t+"&bull; "),jQuery("#wppa-filler-"+p).css("display","none")}0==w?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(e)}}}function wppaGetDislikeText(p,a,e){return p}function _wppaSetRd(p,a,e){var t=parseInt(a),i=t+1,w=wppaStarOpacity+(a-t)*(1-wppaStarOpacity),r=wppaRatingMax;if("void"==a)jQuery("#wppa-my-rat-"+p).hide(),jQuery(".wppa-my-rat-"+p).hide(),jQuery(".wppa-rate-"+p).hide(),jQuery(".wppa-ratingthumb").hide(),jQuery("#wppa-numrate-mine-"+p).hide();else for(jQuery("#wppa-my-rat-"+p).show(),jQuery(".wppa-my-rat-"+p).show(),jQuery(".wppa-rate-"+p).show(),jQuery(".wppa-ratingthumb").show(),jQuery("#wppa-numrate-mine-"+p).show(),idx=1;idx<=r;idx++)"#wppa-rate-"!=e&&".wppa-rate-"!=e||jQuery(e+p+"-"+idx).attr("src")!=wppaImageDirectory+"star.ico"&&jQuery(e+p+"-"+idx).attr("src",wppaImageDirectory+"star.ico"),idx<=t?jQuery(e+p+"-"+idx).stop().fadeTo(100,1):idx==i?jQuery(e+p+"-"+idx).stop().fadeTo(100,w):jQuery(e+p+"-"+idx).stop().fadeTo(100,wppaStarOpacity)}function _wppaFollowMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,a,"#wppa-rate-")}function wppaOvlFollowMe(p,a,e){e||_wppaSetRd(p,a,".wppa-rate-")}function _wppaLeaveMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,_wppaMyr[p][_wppaCurIdx[p]],"#wppa-rate-")}function wppaOvlLeaveMe(p,a,e){_wppaSetRd(p,e,".wppa-rate-")}function _wppaValidateComment(p,a){if(a=a||_wppaId[p][_wppaCurIdx[p]],jQuery("#wppa-comname-"+p).val().length<1)return alert(wppaPleaseName),!1;if("required"==wppaEmailRequired||"optional"==wppaEmailRequired){var e=jQuery("#wppa-comemail-"+p).val();if("optional"==wppaEmailRequired&&0==e.length)return!0;var t=e.indexOf("@"),i=e.lastIndexOf(".");if(t<1||i<t+2||i+2>=e.length)return alert(wppaPleaseEmail),!1}return!(jQuery("#wppa-comment-"+p).val().length<1)||(alert(wppaPleaseComment),!1)}function _wppaGo(p){document.location=p}function _wppaBbb(p,a,e){if(!_wppaSSRuns[p]){var t="#bbb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".bbb-"+p).css("cursor","pointer");break;case"hide":jQuery(".bbb-"+p).removeAttr("title"),jQuery(".bbb-"+p).css("cursor","default");break;case"click":"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}}function _wppaUbb(p,a,e){var t="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".ubb-"+p).css("cursor","pointer"),jQuery(".ubb-"+p).stop().fadeTo(200,.8),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,.8);break;case"hide":jQuery(".ubb-"+p).removeAttr("title"),jQuery(".ubb-"+p).css("cursor","default"),jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);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,e;return"random"==_wppaTimeOut[p]?(a=2*wppaAnimationSpeed,e=7*wppaAnimationSpeed,Math.floor(Math.random()*(e-a+1))+a):_wppaTimeOut[p]}
7
+ // wppa-ajax-front
8
+ var wppaJsAjaxVersion="7.4.01",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(o,a,r,e,p,t){0<parseInt(p)&&p!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+o+", '"+a+"', '"+r+"', '"+e+"', "+p+" )",100):(wppaRenderAdd=e,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[o]&&(a+="&resp=1"),t&&_wppaCurIdx[o]&&_wppaId[o][_wppaCurIdx[o]]&&(a+="&wppa-hilite="+_wppaId[o][_wppaCurIdx[o]]),wppaCanAjaxRender||!r?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[o]&&_wppaStop(o),jQuery("#wppa-ajax-spin-"+o).fadeIn()},success:function(a,e,p){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+o+"-end"):wppaRenderModal&&r?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(o)})):(jQuery("#wppa-container-"+o).html(a),jQuery("#wppa-button-hide-"+o).show()),wppaCanPushState&&wppaUpdateAddressLine&&r){wppaHis++,r=r.split("&amp;").join("&");try{history.pushState({page:wppaHis,occur:o,type:"html",html:a},"",r)}catch(a){try{history.replaceState({page:wppaHis,occur:o,type:"html"},"",r)}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=o)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(r),wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},error:function(a,e,p){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+p+", status = "+e,"force"),document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},complete:function(a,e,p){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+o).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+o).stop().fadeOut(),_wppaLazyDone[o]=!1,_wppaLazyDone[0]=!1,window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhotoFromZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=removefromzip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-rem-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-rem-"+r+"-"+o).prop("disabled",!0),jQuery("#admin-choice-rem-"+r+"-"+o).css("text-decoration","")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhotoFromZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,e,p){document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRequestInfo(a,e,p){dialogHtml="<h3>"+wppaRequestInfoDialogText+'</h3><textarea id="wppa-request-info-text-'+a+'" style="width:98%;" ></textarea><div style="clear:both;" ></div><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Send" onclick="wppaAjaxRequestInfoSend( '+a+", "+e+", "+p+' )" /><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Cancel" onclick="jQuery( \'#wppa-modal-container-'+a+"' ).dialog( 'close' );\" /><div style=\"clear:both;\" ></div>";var t={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(dialogHtml).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}function wppaAjaxRequestInfoSend(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r+"&emailtext="+jQuery("#wppa-request-info-text-"+o).val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#request-info-"+r+"-"+o).val(t[1]),jQuery("#request-info-"+r+"-"+o).prop("disabled",!0),jQuery("#wppa-modal-container-"+o).dialog("close")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRequestInfoSend failed. Error = "+p+", status = "+e,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),p="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){var e;"classic"==wppaUploadEdit&&((r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>"),e='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+p+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>',r.document.write(e),r.document.write("</head>"),r.document.write("<body>"))},success:function(a,e,p){var t;"classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit&&(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"))},error:function(a,e,p){"classic"==wppaUploadEdit&&r.document.write(e+" "+p),wppaConsoleLog("wppaEditPhoto failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,e,p,t){for(var o,r,n=jQuery("."+a),i=[],c=jQuery("#"+p).val(),u=0,s=0;u<n.length;)n[u].selected&&(i[s]=n[u].value,s++),u++;""!=(o=jQuery("#"+e).val())&&(i[s]=o),r=i.join(),""==o&&""==p||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,e,p){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,e,p){jQuery("#"+t).html('<span style="color:red" >'+p+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDestroyAlbum(a,e){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+e,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+p+", status = "+e,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,e,p){},error:function(a,e,p){wppaConsoleLog("_bumpClickCount failed. Error = "+p+", status = "+e,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){wppaPhotoView[t]=!0},error:function(a,e,p){wppaConsoleLog("_bumpViewCount failed. Error = "+p+", status = "+e,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,e,p){wppaConsoleLog("wppaVoteThumb failed. Error = "+p+", status = "+e,"force")}})}function _wppaRateIt(r,e){var a,p,t;0!=e&&(_wppaSSRuns[r]||(a=_wppaId[r][_wppaCurIdx[r]],p=_wppaMyr[r][_wppaCurIdx[r]],0<(t=_wppaWaitTexts[r][_wppaCurIdx[r]]).length?alert(t):0!=p&&wppaRatingOnce||p<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+e+"&wppa-rating-id="+a+"&wppa-occur="+r+"&wppa-index="+_wppaCurIdx[r]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+r+"-"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+r+"-"+e).stop().fadeTo(100,1),jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t,o=a.split("||");0==o[0]?900==o[1]?(alert(o[2]),_wppaSetRatingDisplay(r)):alert("Error Code="+o[1]+"\n\n"+o[2]):(o[7]&&"likes"==o[7]?(t=o[4].split("|"),jQuery("#wppa-like-"+r).attr("title",t[0]),jQuery("#wppa-liketext-"+r).html(t[1]),"1"==o[3]?jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4]):(_wppaMyr[o[0]][o[2]]=o[3],_wppaAvg[o[0]][o[2]]=o[4],_wppaDisc[o[0]][o[2]]=o[5],_wppaSetRatingDisplay(r),wppaCommentRequiredAfterVote&&0==o[6]&&alert(o[7])),wppaNextOnCallback&&_wppaNextOnCallback(r))},error:function(a,e,p){wppaConsoleLog("_wppaRateIt failed. Error = "+p+", status = "+e,"force")}}))))}function _wppaOvlRateIt(r,n,i,c){0!=n&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+n+"&wppa-rating-id="+r+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+i+"-"+n).stop().fadeTo(100,1),jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+i+"-"+n).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){var o=t[4].split("|");return jQuery("#wppa-like-0").attr("title",o[0]),jQuery("#wppa-liketext-0").html(o[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+r+"-"+i).attr("title",o[0]),jQuery("#wppa-liketext-"+r+"-"+i).html(o[1]),void("1"==t[3]?jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+r+"-"+i).attr("src",wppaImageDirectory+"thumbup.png"))}if(_wppaSetRd(i,t[4],".wppa-avg-"),_wppaSetRd(i,t[3],".wppa-rate-"),c)return;wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,e,p){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxMakeOrigName(a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+e+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,e,p){var t=a.split("||");"0"==t[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.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,e,p){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,e,p){var t=a.split("||"),o=t[0],r=t[1],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,e,p){alert("An error occurred:\n"+p+"\nPlease try again")},complete:function(a,e,p){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){var e;_wppaValidateComment(t,a)&&(e="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t,void 0!==jQuery("#wppa-comemail-"+t).val()&&(e+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(e+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(e+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(e+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:e,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,e,p){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,e,p){wppaConsoleLog("wppaAjaxComment failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){jQuery("#wppa-comment-spin-"+t).css("display","none")}}))}function wppaUpdatePhotoNew(a){for(var e=["upn-name","upn-description","upn-tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],p="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<e.length;)void 0!==jQuery("#"+e[t]).val()&&(p+="&"+e[t]+"="+jQuery("#"+e[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:p,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,e,p){0<a.length&&alert(a)},error:function(a,e,p){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,o){var e;wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,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,p){var t=a.split("|");document.getElementById(o).src=t[0],jQuery(o).attr("title",t[1])},error:function(a,e,p){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+p+", status = "+e,"force")}}))}function wppaAjaxNotify(a,e){var p=jQuery(a).prop("checked")?"on":"off",t="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+e+"&onoff="+p;jQuery.ajax({url:wppaAjaxUrl,data:t,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxNotify failed. Error = "+p+", status = "+e,"force")}})}
9
+ // wppa-lightbox
10
+ var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaRenderer,wppaScene,wppaCamera,wppaSphere,wppaSphereMaterial,wppaSphereMesh,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlActivePanorama=0,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(a){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(a){var p,e=(p=null==a?event.keyCode:a.keyCode,27),t=String.fromCharCode(p).toLowerCase();switch(p){case e:wppaStopVideo(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"f":wppaOvlFull();break;case"q":case"x":wppaStopVideo(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(){document.getElementById("wppa-overlay-ic")&&(wppaOvlMode="padded",jQuery.fullscreen.isFullScreen()||jQuery("#wppa-overlay-ic").fullscreen(),setTimeout(function(){wppaShowFsButtons()},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlNorm(a){document.getElementById("wppa-overlay-ic")&&(wppaOvlMode="normal",jQuery.fullscreen.isFullScreen()&&jQuery.fullscreen.exit(),a||(setTimeout(function(){wppaShowFsButtons()},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50)))}function wppaOvlShow(a){var p,e,t=jQuery;if(0<wppaOvlActivePanorama?t("#wppa-overlay-ic").css({top:0,left:0}):t("#wppa-overlay-ic").css({top:"50%",left:"50%"}),wppaOvlFirst&&(t("#weaver-final").removeClass("wvr-hide-bang"),t("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaKbHandlerInstalled||(t(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),t("#wppa-overlay-bg").css({width:window.innerWidth,height:window.innerHeight}),t(window).trigger("wppalightboxstart")),"object"==typeof a){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var l=(a.rel?a.rel:!!t(a).attr("data-rel")&&t(a).attr("data-rel")).split("[");if(l[1])for(var o,i=l[1],n=t("a"),w=0,d=0;d<n.length;d++)1<(l=!!t(o=n[d]).attr("data-rel")&&t(o).attr("data-rel").split("[")).length&&"wppa"==l[0]&&l[1]==i&&(wppaOvlUrls[w]=o.href,t(o).attr("data-lbtitle")?wppaOvlTitles[w]=wppaRepairScriptTags(t(o).attr("data-lbtitle")):wppaOvlTitles[w]=wppaRepairScriptTags(o.title),wppaOvlIds[w]=t(o).attr("data-id")?t(o).attr("data-id"):"0",wppaOvlAlts[w]=t(o).attr("data-alt")?t(o).attr("data-alt"):"",wppaOvlVideoHtmls[w]=t(o).attr("data-videohtml")?decodeURI(t(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[w]=t(o).attr("data-pdfhtml")?decodeURI(t(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[w]=t(o).attr("data-audiohtml")?decodeURI(t(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[w]=t(o).attr("data-videonatwidth")?t(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[w]=t(o).attr("data-videonatheight")?t(o).attr("data-videonatheight"):"",0<(p=t(o).attr("data-panorama")?t(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=p.indexOf("."),wppaOvlPanoramaHtml[w]=p.substr(e+1),wppaOvlPanoramaIds[w]=p.substr(0,e)):(wppaOvlPanoramaHtml[w]="",wppaOvlPanoramaIds[w]=0),decodeURI(t(o).attr("data-pdfhtml"))==decodeURI(t(a).attr("data-pdfhtml"))&&decodeURI(t(o).attr("data-videohtml"))==decodeURI(t(a).attr("data-videohtml"))&&decodeURI(t(o).attr("data-audiohtml"))==decodeURI(t(a).attr("data-audiohtml"))&&o.href==a.href&&(wppaOvlIdx=w),w++);else wppaOvlUrls[0]=a.href,t(a).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(t(a).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(a.title),wppaOvlIds[0]=t(a).attr("data-id")?t(a).attr("data-id"):"0",wppaOvlAlts[0]=t(a).attr("data-alt")?t(a).attr("data-alt"):"",wppaOvlVideoHtmls[0]=t(a).attr("data-videohtml")?decodeURI(t(a).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=t(a).attr("data-audiohtml")?decodeURI(t(a).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=t(a).attr("data-pdfhtml")?decodeURI(t(a).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=t(a).attr("data-videonatwidth")?t(a).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=t(a).attr("data-videonatheight")?t(a).attr("data-videonatheight"):"",0<(p=t(a).attr("data-panorama")?t(a).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=p.indexOf("."),wppaOvlPanoramaHtml[0]=p.substr(e+1),wppaOvlPanoramaIds[0]=p.substr(0,e)):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0),wppaOvlIdx=0}else wppaOvlIdx=a;wppaOvlOpen=!0,setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(a){var p=jQuery;if(wppaOvlCurIdx=a,wppaOvlFirst&&p("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[a],wppaHasAudio=""!=wppaOvlAudioHtmls[a],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[a],!(0<wppaOvlUrls[a].length)||wppaIsVideo||(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaIsIe||wppaOvlImgs[a].complete||!wppaOvlOpen)){var e,t=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1;if(""==wppaOvlVideoHtmls[t]&&wppaOvlOpen&&(wppaOvlImgs[t]=new Image,wppaOvlImgs[t].src=wppaOvlUrls[t]),!wppaOvlRunning&&wppaOvlOpen&&(e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[e]&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e])),_bumpViewCount(wppaOvlIds[a]),wppaOvlIsSingle=1==wppaOvlUrls.length,0<wppaOvlPanoramaIds[a]?(wppaOvlActivePanorama=wppaOvlPanoramaIds[a],p("#wppa-overlay-ic").css({top:0,left:0})):(wppaOvlActivePanorama=0,p("#wppa-overlay-ic").css({top:"50%",left:"50%",display:"block"})),""==wppaOvlMode&&("normal"==wppaOvlModeInitial?wppaOvlNorm:wppaOvlFull)(),"normal"!=wppaOvlMode||wppaOvlActivePanorama)return wppaOvlActivePanorama?o=wppaOvlPanoramaHtml[a]:wppaIsVideo?o='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video></div>":wppaOvlIsPdf?o='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[a]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" ></iframe></div>':(o='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(o+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),o+="</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),p("#wppa-overlay-ic").html(o)),0<wppaOvlPanoramaIds[a]&&wppaOvlIsSingle&&p(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,setTimeout(function(){wppaShowFsButtons()},30),!1;wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);var l="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(l=wppaOvlFontColor);wppaOvlUrls.length;p("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var o="";o+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(o+='<video id="wppa-overlay-img" onmouseover="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?o+="<iframe "+wppaOvlPdfHtmls[a]+' id="wppa-overlay-img" onmouseover="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" ></iframe>':(o+='<img id="wppa-overlay-img" onmouseover="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(o+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),wppaOvlIsVideo=!1),o+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return o+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+l+";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;" >',o+=wppaOvlNavBar(),o+=(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[a],o+="</div>",o+="</div>",p("#wppa-overlay-ic").html(o),setTimeout(function(){wppaShowFsButtons()},30),p("#wppa-overlay-img").bind("contextmenu",function(a){return!1}),0==wppaOvlPanoramaIds[a]&&wppaOvlResize(),wppaOvlFirst&&setTimeout(function(){wppaShowFsButtons()},30),!1}setTimeout("_wppaOvlShow("+a+")",500)}function wppaOvlSize(a){var p=jQuery;if(!wppaOvlActivePanorama){var e=document.getElementById("wppa-overlay-img"),t=document.getElementById("wppa-overlay-txt");if(e&&t&&"none"!=p("#wppa-overlay-bg").css("display")){if("normal"==wppaOvlMode){var l,o,i,n,w=wppaWindowWidth(),d=wppaWindowHeight(),r=wppaOvlIsVideo?(e.clientWidth,l=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),l=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(e.clientWidth,l=e.naturalWidth,e.naturalHeight);void 0===l&&(l=e.clientWidth,r=e.clientHeight),(n=(o=(w-3*wppaOvlBorderWidth)/l)<(i=d/r)?o:i)<1&&(l=parseInt(l*n),r=parseInt(r*n));var v=p("#wppa-overlay-txt").height(),s="auto"==wppaOvlTxtHeight?(0==v&&(v=20+2*wppaOvlBorderWidth),d-v-20-2*wppaOvlBorderWidth):d-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,h=parseInt(s*l/r),c=(wppaOvlPadTop,parseInt((w-h)/2),h);r<s&&(wppaOvlPadTop,parseInt((w-l)/2),c=l);var O=wppaSavedImageWidth-c<3&&c-wppaSavedImageWidth<3;return c<=10&&(r=180,O=!(l=c=240)),c=parseInt(c),wppaSavedImageWidth=parseInt(c),wppaSavedImageHeight=parseInt(c*r/l),wppaSavedMarginLeft=-parseInt(c/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(c+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+p("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),p("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},a),p("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},a),O?(p("#wppa-ovl-spin").hide(),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},a+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){var a,p,e,t=jQuery;if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){if(wppaOvlIsVideo)a=document.getElementById("wppa-overlay-img"),p=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)a=document.getElementById("wppa-overlay-img"),p=screen.width,e=screen.height;else{if(a=document.getElementById("wppa-overlay-img"),!(wppaIsIe||a&&a.complete))return void setTimeout("wppaOvlFormatFull()",10);p=a.naturalWidth,e=a.naturalHeight}var l=screen.width/screen.height,o=p/e,i=0,n=0,w=0,d=0,r=0,v=0,s="hidden";switch(wppaOvlMode){case"padded":d=o<l?(i=(screen.width-screen.height*o)/2,n=0,w=screen.height,screen.height*o):(i=0,n=(screen.height-screen.width/o)/2,w=screen.width/o,screen.width);break;case"stretched":n=i=0,w=screen.height,d=screen.width;break;case"clipped":d=o<l?(i=0,n=(screen.height-screen.width/o)/2,w=screen.width/o,screen.width):(i=(screen.width-screen.height*o)/2,n=0,w=screen.height,screen.height*o);break;case"realsize":(i=(screen.width-p)/2)<0&&(v=parseInt(-i),i=0),(n=(screen.height-e)/2)<0&&(r=parseInt(-n),n=0),w=e,d=p,s="auto"}return i=parseInt(i),n=parseInt(n),w=parseInt(w),d=parseInt(d),t(a).css({height:w,width:d,marginLeft:i,marginTop:n,left:0,top:0,maxWidth:1e4}),t(a).css({visibility:"visible"}),t("#wppa-ovl-full-bg").css({overflow:s}),t("#wppa-ovl-full-bg").scrollTop(r),t("#wppa-ovl-full-bg").scrollLeft(v),t("#wppa-ovl-spin").hide(),html=t("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",t("#wppa-overlay-ic").html(html),!0}}function wppaOvlStartAudio(){var a=document.getElementById("wppa-overlay-audio");a&&"function"==typeof a.play&&a.play()}function wppaOvlStartStop(){var a=jQuery;wppaOvlRunning?(wppaOvlRunning=!1,-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&a("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&a("#wppa-ovl-next-btn").css("visibility","visible"),a("#wppa-ovl-stop-btn").hide(),a("#wppa-ovl-start-btn").show())):(wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",50);else{if(!wppaIsVideo){var a=document.getElementById("wppa-overlay-img");if(a&&!wppaIsIe&&!a.complete)return void setTimeout("wppaOvlRun()",50)}var p=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1;wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(p),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaOvlIsSingle||(wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1)),!1}function wppaOvlShowNext(){return wppaOvlIsSingle||(jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1)),!1}function wppaOvlHide(){var a=jQuery;wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),a("#wppa-overlay-ic").html(""),a("#wppa-overlay-bg").fadeOut(300),a(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,wppaOvlMode="",a("#wppa-ovl-spin").hide(),a("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,wppaOvlOpen=!1,document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),a(window).trigger("wppalightboxend"),a(window).trigger("resize")}function wppaOvlOnclick(a){switch(wppaOvlOnclickType){case"none":break;case"close":"normal"==wppaOvlMode&&wppaOvlHide();break;case"browse":var p=a.screenX-window.screenX;48<a.clientY&&(p<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}return!0}function wppaInitOverlay(){var o=jQuery;o(".wp-caption").each(function(){var a=o(this),p=a.find("IMG[alt]").attr("alt")||"",e=a.find(".wp-caption-text").html()||"",t=a.find("a"),l=p+"<br>"+e;t.attr("data-lbtitle")||t.attr("data-lbtitle",l)}),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var a,p,e=o("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=wppaOvlCurIdx=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),p=0;p<e.length;p++)if(a=e[p],o(a).attr("data-rel")?t=o(a).attr("data-rel").split("["):a.rel?t=a.rel.split("["):t[0]="","wppa"==t[0])switch(wppaWppaOverlayActivated=!0,o(a).on("click",function(a){wppaOvlShow(this),a.preventDefault()}),wppaMagnifierCursor){case"pointer":o(a).css("cursor","pointer");break;case"":o(a).css("cursor","default");break;default:o(a).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange),o(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaAdjustControlbar)}function wppaAdjustControlbar(){var a,p=jQuery;wppaOvlOpen&&("normal"!=wppaOvlMode&&(p(".wppa-pctl-div-lb").css({position:"fixed",left:0,right:0,bottom:0,width:screen.width}),p("#wppa-ovl-wrap").css({width:screen.width,height:screen.height})),(a=p(".wppa-pctl-div-lb").width())<12*(parseInt(wppaOvlIconSize)+4)&&(newHeight=parseInt(a/12-4),0<newHeight&&(p(".wppa-pctl-div-lb").find("svg").css({height:newHeight,width:newHeight}),p(".wppa-pctl-div-lb").find("span").css({height:newHeight,width:newHeight}))),p(".wppa-pctl-div-lb").css({visibility:"visible"}))}function wppaOvlResize(){0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",100))}function wppaShowFsButtons(){var a=jQuery;"normal"==wppaOvlMode?(a("#wppa-exit-fulls-btn-2").hide(),a("#wppa-fulls-btn-2").show()):(a("#wppa-exit-fulls-btn-2").show(),a("#wppa-fulls-btn-2").hide()),wppaOvlIsSingle||(wppaOvlRunning?a("#wppa-ovl-stop-btn").show():a("#wppa-ovl-start-btn").show())}function wppaOvlImgClick(a){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(a.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var a="";return wppaOvlIsSingle||(a+='<span id="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:inline-block;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-start-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"none":"inline-block")+';" title="Start" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Play-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-stop-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"inline-block":"none")+';" title="Stop" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Pause-Button",wppaOvlIconSize,!0,!0)+"</span>",a+='<span id="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:inline-block;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>"),a+='<span id="wppa-exit-btn-2" style="margin:0 2px;float:right;display:inline-block;" title="Exit" onclick="wppaOvlHide()" >'+wppaSvgHtml("Exit-2",wppaOvlIconSize,!0,!0)+"</span>",a+='<span id="wppa-fulls-btn-2" style="margin:0 2px;float:right;display:'+("normal"==wppaOvlMode?"inline-block":"none")+';" title="Enter fullscreen" onclick="wppaOvlFull()" >'+wppaSvgHtml("Full-Screen-2",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-exit-fulls-btn-2" style="margin:0 2px;float:right;display:'+("normal"==wppaOvlMode?"none":"inline-block")+';" title="Leave fullscreen" onclick="wppaOvlNorm()" >'+wppaSvgHtml("Exit-Full-Screen-2",wppaOvlIconSize,!0,!0)+"</span>"}jQuery(document).ready(function(a){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()});
11
+ // wppa-popup
12
+ var wppaJsPopupVersion="7.5.03";function wppaPopUp(p,t,e,r,a,i,o,n,d,s){var c,l,u,w,m,g,y,h,x,f,b,v=jQuery("#wppa-thumb-area-"+p).width();if(document.getElementById("x-"+e+"-"+p)){var j=(r?'<div id="wppa-name-'+p+'" style="display:none; padding:1px;" class="wppa_pu_info">'+r+"</div>":"")+(a?'<div id="wppa-desc-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+a+"</div>":"")+(i?'<div id="wppa-rat-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+i+"</div>":"")+(o?'<div id="wppa-ncom-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+o+"</div>":""),k="";switch(wppaThumbTargetBlank&&(k='target="_blank"'),wppaPopupLinkType){case"none":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;case"fullpopup":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" onclick="'+wppaPopupOnclick[e]+'" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;default:t.onclick?(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>"),document.getElementById("wppa-img-"+p).onclick=t.onclick):(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;"><a id="wppa-a" href="'+document.getElementById("x-"+e+"-"+p).href+'" '+k+' style="line-height:1px;" >'+b+"</a>"+j+"</div>"))}}f=document.getElementById("wppa-img-"+p),y=parseInt(d),m=parseInt(s),f&&jQuery(".wppa_pu_info").css("width",(m<y?y:m)-8+"px"),w=parseInt(t.offsetLeft)-7-5-1,l=parseInt(t.offsetTop)-7-1,jQuery("#grid-item-"+p+"-"+e).length&&(w+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("left"))+6,l+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("top"))),h=parseInt(t.clientWidth),g=parseInt(t.clientHeight),x=m<y?y:m,(u=w-parseInt((x-h)/2))<0&&(u=0),v<u+y+16&&(u=v-y-16),(c=l-parseInt((m-g)/2))<0&&(c=0);var I=parseInt((x-y)/2);jQuery("#wppa-img-"+p).css({maxWidth:y+"px"}),jQuery("#wppa-popup-"+p).css({marginLeft:w+"px",marginTop:l+"px"}),jQuery("#wppa-img-"+p).css({marginLeft:0,marginRight:0,width:h+"px",height:g+"px"}),jQuery("#wppa-popup-"+p).stop().animate({marginLeft:u+"px",marginTop:c+"px"},400),jQuery("#wppa-img-"+p).stop().animate({marginLeft:I+"px",marginRight:I+"px",width:y+"px",height:m+"px"},400),setTimeout("wppaPopReady( "+p+" )",400)}function wppaPopReady(p){jQuery("#wppa-name-"+p).show(),jQuery("#wppa-desc-"+p).show(),jQuery("#wppa-rat-"+p).show(),jQuery("#wppa-ncom-"+p).show(),wppaProtect()}function wppaPopDown(p){jQuery("#wppa-popup-"+p).html("")}function wppaFullPopUp(p,t,e,r,a){var i=a+50,o=r+14,n="",d="",s=document.getElementById("i-"+t+"-"+p);s&&(n=s.alt,d=s.title);var c,l=".pdf"==e.substr(e.length-4,e.length),u=window.open("","Print","width="+o+", height="+i+", location=no, resizable=no, menubar=yes ");u.document.write("<html>"),u.document.write("<head>"),u.document.write('<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+"; text-align:center;}</style>"),u.document.write("<title>"+n+"</title>"),u.document.write('<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js" ><\/script><script type="text/javascript">function wppa_downl() {jQuery.ajax( { \turl: \t\t\''+wppaAjaxUrl+"',data: \t\t'action=wppa&wppa-action=makeorigname&photo-id="+t+"&from=popup',async: \ttrue,type: \t\t'GET',timeout: \t10000,beforeSend:\tfunction( xhr ) {},success: \t\tfunction( result, status, xhr ) {result = result.split( \"||\" );if ( result[1] == \"0\" ) {window.open( result[2] );return true;}else {alert( \"Error: \"+result[1]+\" \"+result[2] );return false;}},error: \t\tfunction( xhr, status, error ) {wppaConsoleLog( 'wppaFullPopUp failed. Error = ' + error + ', status = ' + status, 'force' );},} );}<\/script>"),u.document.write('<script type="text/javascript">function wppa_print() {document.getElementById( "wppa_printer" ).style.visibility="hidden"; document.getElementById( "wppa_download" ).style.visibility="hidden"; window.print();}<\/script>'),u.document.write("</head>"),u.document.write("<body>"),u.document.write('<div style="width:'+r+'px;">'),l?u.document.write('<iframe src="'+e+'" style="padding-bottom:6px;width:100%;height:'+(i-60)+'px;" ></iframe><br />'):u.document.write('<img src="'+e+'" style="padding-bottom:6px;" /><br />'),u.document.write('<div style="text-align:center">'+d+"</div>"),l||(c=r-66,u.document.write('<img src="'+wppaImageDirectory+'download.png" id="wppa_download" title="Download" style="position:absolute; top:6px; left:'+c+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_downl();" />'),c=r-30,u.document.write('<img src="'+wppaImageDirectory+'printer.png" id="wppa_printer" title="Print" style="position:absolute; top:6px; left:'+c+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_print();" />')),u.document.write("</div>"),u.document.write("</body>"),u.document.write("</html>"),wppaProtect()}
13
+ // wppa-touch
14
+ var wppaJsTouchVersion="7.5.03",wppaTriggerElementID=null,wppaFingerCount=0,wppaStartX=0,wppaStartY=0,wppaCurX=0,wppaCurY=0,wppaDeltaX=0,wppaDeltaY=0,wppaHorzDiff=0,wppaVertDiff=0,wppaMinLength=72,wppaSwipeLength=0,wppaSwipeAngle=null,wppaSwipeDirection=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=0,wppaMobileTimeStart=0;function wppaStartTime(){var p=(new Date).getTime();return wppaMobileTimeStart=p,!0}function wppaInTime(){return(new Date).getTime()-wppaMobileTimeStart<250}function wppaTapLink(p,e){wppaInTime()&&(_bumpClickCount(p),document.location.href=e)}function wppaTouchStart(p,e,a){-1==(wppaSwipeMocc=a)&&(wppaSwipeOnLightbox=!0,p.preventDefault()),1==(wppaFingerCount=p.touches.length)?(wppaStartX=p.touches[0].pageX,wppaStartY=p.touches[0].pageY,wppaTriggerElementID=e):wppaTouchCancel()}function wppaTouchMove(p){wppaSwipeOnLightbox&&p.preventDefault(),1==p.touches.length?(wppaCurX=p.touches[0].pageX,wppaCurY=p.touches[0].pageY):wppaTouchCancel()}function wppaTouchEnd(p){wppaSwipeOnLightbox&&p.preventDefault(),1==wppaFingerCount&&0!=wppaCurX&&(wppaSwipeLength=Math.round(Math.sqrt(Math.pow(wppaCurX-wppaStartX,2)+Math.pow(wppaCurY-wppaStartY,2))),wppaMinLength<=wppaSwipeLength&&(wppaCalculateAngle(),wppaDetermineSwipeDirection(),wppaProcessingRoutine())),wppaTouchCancel()}function wppaTouchCancel(){wppaTriggerElementID=wppaSwipeDirection=wppaSwipeAngle=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=wppaSwipeLength=wppaVertDiff=wppaHorzDiff=wppaDeltaY=wppaDeltaX=wppaCurY=wppaCurX=wppaStartY=wppaStartX=wppaFingerCount=0}function wppaCalculateAngle(){var p=wppaStartX-wppaCurX,e=wppaCurY-wppaStartY,a=(Math.round(Math.sqrt(Math.pow(p,2)+Math.pow(e,2))),Math.atan2(e,p));(wppaSwipeAngle=Math.round(180*a/Math.PI))<0&&(wppaSwipeAngle=360-Math.abs(wppaSwipeAngle))}function wppaDetermineSwipeDirection(){wppaSwipeDirection=wppaSwipeAngle<=45&&0<=wppaSwipeAngle||wppaSwipeAngle<=360&&315<=wppaSwipeAngle?"left":135<=wppaSwipeAngle&&wppaSwipeAngle<=225?"right":45<wppaSwipeAngle&&wppaSwipeAngle<135?"down":"up"}function wppaProcessingRoutine(){document.getElementById(wppaTriggerElementID);if(wppaSwipeOnLightbox)"left"==wppaSwipeDirection?wppaOvlShowNext():"right"==wppaSwipeDirection&&wppaOvlShowPrev();else{if("right"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]-1,idx<0){if(!wppaSlideWrap)return;idx=_wppaSlides[wppaSwipeMocc].length-1}wppaGotoKeepState(wppaSwipeMocc,idx)}if("left"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]+1,idx==_wppaSlides[wppaSwipeMocc].length){if(!wppaSlideWrap)return;idx=0}wppaGotoKeepState(wppaSwipeMocc,idx)}}wppaTouchCancel()}
15
+ // wppa-zoom
16
+ function wppaDoZoomPan(){for(var e,u=jQuery,a=!1,t=0;t<wppaZoomableData.length;t++)void 0!==wppaZoomableData[t]&&((e=wppaZoomableData[t]).image.complete?e.initialized||((e=wppaZoomableData[t]).manualControl=!1,e.deltaX=0,e.deltaY=0,e.deltaFactor=1,e.run=4,e.busy=!1,e.abort=!1,e.itemid=e.mocc+"-"+e.id,e.div=u("#wppa-pan-div-"+e.itemid),e.canvas=document.getElementById("wppa-pan-canvas-"+e.itemid),e.left=u("#wppa-pctl-left-"+e.itemid),e.right=u("#wppa-pctl-right-"+e.itemid),e.up=u("#wppa-pctl-up-"+e.itemid),e.down=u("#wppa-pctl-down-"+e.itemid),e.zoomin=u("#wppa-pctl-zoomin-"+e.itemid),e.zoomout=u("#wppa-pctl-zoomout-"+e.itemid),e.prev=u("#wppa-pctl-prev-"+e.itemid),e.next=u("#wppa-pctl-next-"+e.itemid),e.canvasWidth=e.width,e.canvasHeight=e.height,e.savedCanvasX=0,e.savedCanvasY=0,e.fromHeight=e.image.height,e.fromWidth=e.image.width,e.fromX=0,e.fromY=0,e.centerX=e.fromX+e.fromWidth/2,e.centerY=e.fromY+e.fromHeight/2,e.ctx=null,e.buttondown=!1,e.isMobile?(e.right.on("touchstart",i),e.right.on("touchend",c),e.left.on("touchstart",p),e.left.on("touchend",c),e.up.on("touchstart",r),e.up.on("touchend",c),e.down.on("touchstart",m),e.down.on("touchend",c),e.zoomin.on("touchstart",d),e.zoomin.on("touchend",c),e.zoomout.on("touchstart",l),e.zoomout.on("touchend",c)):(e.canvas.addEventListener("mousedown",v),e.canvas.addEventListener("mousemove",f),e.canvas.addEventListener("mouseup",b),e.canvas.addEventListener("mouseout",b),document.getElementById("wppa-pan-canvas-"+e.itemid).addEventListener("wheel",s),e.right.on("mousedown",i),e.right.on("mouseup",c),e.left.on("mousedown",p),e.left.on("mouseup",c),e.up.on("mousedown",r),e.up.on("mouseup",c),e.down.on("mousedown",m),e.down.on("mouseup",c),e.zoomin.on("mousedown",d),e.zoomin.on("mouseup",c),e.zoomout.on("mousedown",l),e.zoomout.on("mouseup",c)),e.isLightbox&&(u("#wppa-fulls-btn").on("click",function(){abort=!0}),e.prev&&(e.prev.on("click",o),e.next.on("click",n))),u(window).on("DOMContentLoaded load resize orientationchange",h),w(t),h(),e.initialized=!0):a=!0);function w(a){if((e=wppaZoomableData[a]).isLightbox&&(wppaOvlOpen||(e.abort=!0)),e.abort)return e.ctx=null,void(e.prevctx=null);var t,o;0!=e.run&&(e.busy||(e.busy=!0,e.manualControl||(e.fromX+=e.deltaX,e.fromY+=e.deltaY,t=e.fromHeight/e.deltaFactor,o=e.fromWidth/e.deltaFactor,1!=e.deltaFactor&&t<=e.image.height&&50<t&&(e.fromX-=(o-e.fromWidth)/2,e.fromY-=(t-e.fromHeight)/2,e.fromWidth=o,e.fromHeight=t)),e.fromX=Math.max(0,Math.min(e.image.width-e.fromWidth,e.fromX)),e.fromY=Math.max(0,Math.min(e.image.height-e.fromHeight,e.fromY)),e.ctx=e.canvas.getContext("2d"),e.ctx.drawImage(e.image,e.fromX,e.fromY,e.fromWidth,e.fromHeight,0,0,e.canvas.width,e.canvas.height),e.busy=!1,0<e.run&&(e.manualControl?setTimeout(function(){w(a)},25):e.buttondown&&setTimeout(function(){w(a)},5)),e.run<5&&e.run--,e.initializing&&(e.initializing=!1,e.run--),wppaAdjustControlbar()))}function o(a){var t;a.preventDefault(),this.abort=!0,t||(t=!0,u("#wppa-overlay-ic").css({display:"none"}),u("#wppa-ovl-spin").show(),wppaOvlShowPrev())}function n(a){var t;a.preventDefault(),this.abort=!0,t||(t=!0,u("#wppa-overlay-ic").css({display:"none"}),u("#wppa-ovl-spin").show(),wppaOvlShowNext())}function i(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaX=3,e.buttondown=!0,w(t))}function p(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaX=-3,e.buttondown=!0,w(t))}function r(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaY=-3,e.buttondown=!0,w(t))}function m(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaY=3,e.buttondown=!0,w(t))}function d(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaFactor=1.005,e.buttondown=!0,w(t))}function l(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaFactor=.995,e.buttondown=!0,w(t))}function s(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=4,wppaZoomableData[t].deltaFactor=1+a.deltaY*wppaZoomableData[t].zoomsensitivity/(wppaIsChrome?1e4:1e3),w(t),setTimeout(function(){wppaZoomableData[t].deltaFactor=1},25),a.stopPropagation())}function c(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].deltaX=0,wppaZoomableData[t].deltaY=0,wppaZoomableData[t].deltaFactor=1,wppaZoomableData[t].isLightbox?wppaZoomableData[t].run--:wppaZoomableData[t].run=4,e.buttondown=!1)}function h(a){for(var t,o,e,n,i,p,r,m,d,l,s,c=0;c<wppaZoomableData.length;c++){wppaZoomableData[c]&&wppaZoomableData[c].canvas&&!wppaZoomableData[c].abort&&((t=wppaZoomableData[c]).isLightbox?(u("#wppa-overlay-ic").css("display",""),i=(e="normal"==wppaOvlMode)?(n=window.innerWidth?window.innerWidth:screen.width,window.innerHeight?window.innerHeight:screen.height):(n=screen.width,screen.height),p=parseInt(p),r=parseInt(r),l=(d=8)+(t.controls?t.icsize+10:0)+10,s=t.image.width/t.image.height,e?(d+=2*t.borderWidth,l+=2*t.borderWidth):d=40,m=(o=(n-d)/s<i-l)?(i-(r=(p=n-d)/s)-l)/2+20:(p=s*(i-(t.controls?t.icsize:0)-24),e&&(p-=24),r=p/s,20),u("#wppa-ovl-pan-container").css({marginTop:m}),u("#wppa-overlay-ic").css({marginTop:0}),t.canvasWidth=p,t.canvasHeight=r,t.canvas.width=t.canvasWidth,t.canvas.height=t.canvasHeight,e?(u("#wppa-ovl-pan-container").css({backgroundColor:t.backgroundColor,padding:t.padding,borderRadius:t.borderRadius,borderWidth:t.borderWidth,width:p,marginLeft:0}),u("#wppa-pctl-div-"+t.itemid).css({marginLeft:0}),o?u("#wppa-overlay-ic").css({marginLeft:4}):u("#wppa-overlay-ic").css({marginLeft:(n-p)/2})):(u("#wppa-overlay-ic").css({marginLeft:0}),u("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:0,borderWidth:0,width:p,marginLeft:(n-p)/2}),u("#wppa-pctl-div-"+t.itemid).css({marginLeft:0}))):(t.canvasWidth=u(t.div).parent().width(),t.canvasHeight=t.canvasWidth*t.canvas.height/t.canvas.width,t.canvas.width=t.canvasWidth,t.canvas.height=t.canvasHeight),t.run=5,w(c))}}function v(a){var t,o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(t=wppaZoomableData[o],a.preventDefault(),t.manualControl=!0,t.savedCanvasX=a.offsetX,t.savedCanvasY=a.offsetY,t.run=5,w(o))}function f(a){var t,o,e,n,i=jQuery(this).attr("data-mocc");!wppaZoomableData[i]||(t=wppaZoomableData[i]).manualControl&&(o=t.canvas.width/t.fromWidth,e=(t.savedCanvasX-a.offsetX)/o+t.fromX,n=(t.savedCanvasY-a.offsetY)/o+t.fromY,0<e&&0<n&&e+t.fromWidth<t.image.width&&n+t.fromHeight<t.image.height&&(t.fromX=e,t.fromY=n,t.savedCanvasX=a.offsetX,t.savedCanvasY=a.offsetY))}function b(a){var t,o=jQuery(this).attr("data-mocc");!wppaZoomableData[o]||(t=wppaZoomableData[o]).manualControl&&(t.run=4,t.manualControl=!1)}a?setTimeout(function(){wppaDoZoomPan()},300):u("#wppa-ovl-spin").hide()}
js/wppa-lightbox.js CHANGED
@@ -3,7 +3,8 @@
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaLightboxVersion = '7.5.02';
 
7
 
8
  // Global inits
9
  var wppaIsVideo = false;
@@ -96,17 +97,9 @@ function wppaOvlKeyboardHandler( e ) {
96
  case 's':
97
  wppaOvlStartStop();
98
  break;
99
- case 'd':
100
- jQuery( '#wppa-ovl-legenda-1' ).css( 'visibility', 'hidden' );
101
- jQuery( '#wppa-ovl-legenda-2' ).css( 'visibility', 'hidden' );
102
- wppaShowLegenda = 'hidden';
103
- break;
104
  case 'f':
105
  wppaOvlFull();
106
  break;
107
- case 'l':
108
- wppaOvlNorm();
109
- break;
110
  case 'q':
111
  case 'x':
112
  wppaStopVideo( 0 );
@@ -115,30 +108,23 @@ function wppaOvlKeyboardHandler( e ) {
115
  }
116
  wppaOvlHide();
117
  break;
118
-
119
  }
120
 
121
  return false;
122
  }
123
 
124
- // Toggle fullscreen mode
125
- function wppaOvlFull( init ) {
126
 
127
  // Init
128
- var oldMode = wppaOvlMode;
129
  var elem = document.getElementById( 'wppa-overlay-ic' );
130
  if ( ! elem ) return;
131
 
132
- // Got to fullscreen mode if initially requested or mode is normal
133
- if ( init || oldMode == 'normal' ) {
134
- jQuery('#wppa-overlay-ic').fullscreen();
135
- wppaOvlMode = 'padded';
136
- }
137
 
138
- // Go to normal mode
139
- if ( oldMode != 'normal' ) {
140
- jQuery.fullscreen.exit();
141
- wppaOvlMode = 'normal';
142
  }
143
 
144
  // Update buttons
@@ -159,11 +145,11 @@ function wppaOvlNorm( exit ) {
159
  wppaOvlMode = 'normal';
160
 
161
  // Cancel fullscreen.
162
- jQuery.fullscreen.exit();
 
 
163
 
164
- // If exiting, re-init start mode
165
  if ( exit ) {
166
- wppaOvlMode = wppaOvlModeInitial;
167
  return;
168
  }
169
 
@@ -182,44 +168,40 @@ function wppaOvlShow( arg ) {
182
 
183
  var panData;
184
  var dotPos;
 
185
 
186
  // Panorama requires image container top=0 left=0
187
  // Non panorama: 50%
188
  if ( wppaOvlActivePanorama > 0 ) {
189
- jQuery( '#wppa-overlay-ic' ).css({top:0,left:0});
190
  }
191
  else {
192
- jQuery( '#wppa-overlay-ic' ).css({top:'50%',left:'50%'});
193
  }
194
 
195
  // Do the setup right after the invocation of the lightbox
196
  if ( wppaOvlFirst ) {
197
 
198
  // Prevent Weaver ii from hiding us
199
- jQuery( '#weaver-final' ).removeClass( 'wvr-hide-bang' );
200
 
201
  // Init background
202
- jQuery( '#wppa-overlay-bg' ).stop().fadeTo( 3, wppaOvlOpacity );
203
 
204
  // Install keyboard handler
205
  if ( ! wppaKbHandlerInstalled ) {
206
- jQuery( document ).on( 'keydown', wppaOvlKeyboardHandler );
207
  wppaKbHandlerInstalled = true;
208
  }
209
 
210
  // Adjust background size
211
- jQuery( '#wppa-overlay-bg' ).css({
212
  width:window.innerWidth,
213
  height:window.innerHeight,
214
  });
215
 
216
- // Jump to fullscreen if initially wanted
217
- if ( wppaOvlModeInitial != 'normal' ) {
218
- wppaOvlFull( true );
219
- }
220
-
221
  // Trigger lightbox open event
222
- jQuery(window).trigger( 'wppalightboxstart' );
223
  }
224
 
225
  // If arg = 'this', setup the array of data
@@ -246,8 +228,8 @@ function wppaOvlShow( arg ) {
246
  if ( arg.rel ) {
247
  rel = arg.rel;
248
  }
249
- else if ( jQuery( arg ).attr( 'data-rel' ) ) {
250
- rel = jQuery( arg ).attr( 'data-rel' );
251
  }
252
  else {
253
  rel = false;
@@ -259,15 +241,15 @@ function wppaOvlShow( arg ) {
259
  // We are in a set if temp[1] is defined
260
  if ( temp[1] ) {
261
  var setname = temp[1];
262
- var anchors = jQuery( 'a' );
263
  var anchor;
264
  var i, j = 0;
265
 
266
  // Save the set
267
  for ( i = 0; i < anchors.length; i++ ) {
268
  anchor = anchors[i];
269
- if ( jQuery( anchor ).attr( 'data-rel' ) ) {
270
- temp = jQuery( anchor ).attr( 'data-rel' ).split( "[" );
271
  }
272
  else {
273
  temp = false;
@@ -276,20 +258,20 @@ function wppaOvlShow( arg ) {
276
  if ( temp.length > 1 ) {
277
  if ( temp[0] == 'wppa' && temp[1] == setname ) { // Same set
278
  wppaOvlUrls[j] = anchor.href;
279
- if ( jQuery( anchor ).attr( 'data-lbtitle' ) ) {
280
- wppaOvlTitles[j] = wppaRepairScriptTags( jQuery( anchor ).attr( 'data-lbtitle' ) );
281
  }
282
  else {
283
  wppaOvlTitles[j] = wppaRepairScriptTags( anchor.title );
284
  }
285
- wppaOvlIds[j] = jQuery( anchor ).attr( 'data-id' ) ? jQuery( anchor ).attr( 'data-id' ) : '0';
286
- wppaOvlAlts[j] = jQuery( anchor ).attr( 'data-alt' ) ? jQuery( anchor ).attr( 'data-alt' ) : '';
287
- wppaOvlVideoHtmls[j] = jQuery( anchor ).attr( 'data-videohtml' ) ? decodeURI( jQuery( anchor ).attr( 'data-videohtml' ) ) : '';
288
- wppaOvlPdfHtmls[j] = jQuery( anchor ).attr( 'data-pdfhtml' ) ? decodeURI( jQuery( anchor ).attr( 'data-pdfhtml' ) ) : '';
289
- wppaOvlAudioHtmls[j] = jQuery( anchor ).attr( 'data-audiohtml' ) ? decodeURI( jQuery( anchor ).attr( 'data-audiohtml' ) ) : '';
290
- wppaOvlVideoNaturalWidths[j] = jQuery( anchor ).attr( 'data-videonatwidth' ) ? jQuery( anchor ).attr( 'data-videonatwidth' ) : '';
291
- wppaOvlVideoNaturalHeights[j] = jQuery( anchor ).attr( 'data-videonatheight' ) ? jQuery( anchor ).attr( 'data-videonatheight' ) : '';
292
- panData = jQuery( anchor ).attr( 'data-panorama' ) ? jQuery( anchor ).attr( 'data-panorama' ) : '';
293
 
294
  if ( panData.length > 0 ) {
295
  wppaOvlHasPanoramas = true;
@@ -305,12 +287,11 @@ function wppaOvlShow( arg ) {
305
  // Is this the one we asked for?
306
  // If its not a stub file, one can look at the arg.href (old method).
307
  // So, now we look at data-pdfhtml, data-videohtml, data-audiohtml as well as arg.href
308
- if ( decodeURI( jQuery( anchor ).attr( 'data-pdfhtml' ) ) == decodeURI( jQuery( arg ).attr( 'data-pdfhtml' ) ) &&
309
- decodeURI( jQuery( anchor ).attr( 'data-videohtml' ) ) == decodeURI( jQuery( arg ).attr( 'data-videohtml' ) ) &&
310
- decodeURI( jQuery( anchor ).attr( 'data-audiohtml' ) ) == decodeURI( jQuery( arg ).attr( 'data-audiohtml' ) ) &&
311
  anchor.href == arg.href ) {
312
  wppaOvlIdx = j; // Current index
313
- wppaConsoleLog('Found '+j+': '+arg.href);
314
  }
315
  j++;
316
  }
@@ -321,20 +302,20 @@ function wppaOvlShow( arg ) {
321
  // Single image, treat as set with one element
322
  else {
323
  wppaOvlUrls[0] = arg.href;
324
- if ( jQuery( arg ).attr( 'data-lbtitle' ) ) {
325
- wppaOvlTitles[0] = wppaRepairScriptTags( jQuery( arg ).attr( 'data-lbtitle' ) );
326
  }
327
  else {
328
  wppaOvlTitles[0] = wppaRepairScriptTags( arg.title );
329
  }
330
- wppaOvlIds[0] = jQuery( arg ).attr( 'data-id' ) ? jQuery( arg ).attr( 'data-id' ) : '0';
331
- wppaOvlAlts[0] = jQuery( arg ).attr( 'data-alt' ) ? jQuery( arg ).attr( 'data-alt' ) : '';
332
- wppaOvlVideoHtmls[0] = jQuery( arg ).attr( 'data-videohtml' ) ? decodeURI( jQuery( arg ).attr( 'data-videohtml' ) ) : '';
333
- wppaOvlAudioHtmls[0] = jQuery( arg ).attr( 'data-audiohtml' ) ? decodeURI( jQuery( arg ).attr( 'data-audiohtml' ) ) : '';
334
- wppaOvlPdfHtmls[0] = jQuery( arg ).attr( 'data-pdfhtml' ) ? decodeURI( jQuery( arg ).attr( 'data-pdfhtml' ) ) : '';
335
- wppaOvlVideoNaturalWidths[0] = jQuery( arg ).attr( 'data-videonatwidth' ) ? jQuery( arg ).attr( 'data-videonatwidth' ) : '';
336
- wppaOvlVideoNaturalHeights[0] = jQuery( arg ).attr( 'data-videonatheight' ) ? jQuery( arg ).attr( 'data-videonatheight' ) : '';
337
- panData = jQuery( arg ).attr( 'data-panorama' ) ? jQuery( arg ).attr( 'data-panorama' ) : '';
338
 
339
  if ( panData.length > 0 ) {
340
  wppaOvlHasPanoramas = true;
@@ -366,12 +347,14 @@ function wppaOvlShow( arg ) {
366
  // idx is the numeric index to current lightbox set
367
  function _wppaOvlShow( idx ) {
368
 
 
 
369
  // Globalize index
370
  wppaOvlCurIdx = idx;
371
 
372
  // Show spinner
373
  if ( wppaOvlFirst ) {
374
- jQuery( "#wppa-ovl-spin" ).show();
375
  }
376
 
377
  // Find handy switches
@@ -384,9 +367,7 @@ function _wppaOvlShow( idx ) {
384
  if ( wppaOvlUrls[idx].length > 0 && ! wppaIsVideo ) {
385
  wppaOvlImgs[idx] = new Image();
386
  wppaOvlImgs[idx].src = wppaOvlUrls[idx]; // Preload
387
- wppaConsoleLog( 'Preloading ' + ( idx + 1 ) + '/' + wppaOvlUrls.length + ' (current)' );
388
  if ( ! wppaIsIe && ! wppaOvlImgs[idx].complete && wppaOvlOpen ) {
389
- wppaConsoleLog( 'Retrying preload current image' );
390
  setTimeout( '_wppaOvlShow(' + idx + ')', 500 );
391
  return;
392
  }
@@ -406,7 +387,6 @@ function _wppaOvlShow( idx ) {
406
  if ( wppaOvlVideoHtmls[next] == '' && wppaOvlOpen ) {
407
  wppaOvlImgs[next] = new Image();
408
  wppaOvlImgs[next].src = wppaOvlUrls[next]; // Preload
409
- wppaConsoleLog( 'Preloading > ' + ( next + 1 ) );
410
  }
411
 
412
  // Preload previous ( for hitting the prev button )
@@ -422,7 +402,6 @@ function _wppaOvlShow( idx ) {
422
  if ( wppaOvlVideoHtmls[prev] == '' ) {
423
  wppaOvlImgs[prev] = new Image();
424
  wppaOvlImgs[prev].src = wppaOvlUrls[prev]; // Preload
425
- wppaConsoleLog( 'Preloading < ' + ( prev + 1 ) );
426
  }
427
  }
428
 
@@ -436,11 +415,22 @@ function _wppaOvlShow( idx ) {
436
  // Non panorama: 50%
437
  if ( wppaOvlPanoramaIds[idx] > 0 ) {
438
  wppaOvlActivePanorama = wppaOvlPanoramaIds[idx];
439
- jQuery( '#wppa-overlay-ic' ).css({top:0,left:0});
440
  }
441
  else {
442
  wppaOvlActivePanorama = 0;
443
- jQuery( '#wppa-overlay-ic' ).css({top:'50%',left:'50%',display:'block'});
 
 
 
 
 
 
 
 
 
 
 
444
  }
445
 
446
  // Fullsize?
@@ -449,10 +439,7 @@ function _wppaOvlShow( idx ) {
449
 
450
  // Fullsize panorama?
451
  if ( wppaOvlActivePanorama ) {
452
- html = wppaOvlPanoramaHtml[idx] +
453
- '<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\';" >';
454
-
455
- html += '</div>';
456
  }
457
 
458
  // Fullsize Video
@@ -544,12 +531,12 @@ function _wppaOvlShow( idx ) {
544
  if ( ( ! wppaIsVideo && ! wppaHasAudio ) || wppaOvlFsPhotoId != wppaPhotoId || wppaPhotoId == 0 ) {
545
  wppaStopVideo( 0 );
546
  wppaStopAudio();
547
- jQuery( '#wppa-overlay-ic' ).html( html );
548
  }
549
 
550
  // If panorama and single, hide panorama browse buttons
551
  if ( wppaOvlPanoramaIds[idx] > 0 && wppaOvlIsSingle ) {
552
- jQuery( '.wppa-pan-prevnext' ).hide();
553
  }
554
 
555
  // Disable right mouse button optionally
@@ -567,7 +554,7 @@ function _wppaOvlShow( idx ) {
567
  wppaOvlFirst = false;
568
 
569
  // Update buttons
570
- wppaShowFsButtons();
571
 
572
  return false;
573
  }
@@ -586,7 +573,7 @@ function _wppaOvlShow( idx ) {
586
  var showNav = wppaOvlUrls.length > 1;
587
 
588
  // Initial sizing of image container ( contains image, borders and subtext )
589
- jQuery( '#wppa-overlay-ic' ).css( {
590
  width:wppaSavedContainerWidth,
591
  marginLeft:wppaSavedMarginLeft,
592
  marginTop:wppaSavedMarginTop,
@@ -603,8 +590,8 @@ function _wppaOvlShow( idx ) {
603
 
604
  html += '<video' +
605
  ' id="wppa-overlay-img"' +
606
- ' onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);"' +
607
- ' onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);"' +
608
  ' preload="metadata"' +
609
  ( wppaOvlVideoStart ? ' autoplay' : '' ) +
610
  ' onpause="wppaOvlVideoPlaying = false;"' +
@@ -643,8 +630,8 @@ function _wppaOvlShow( idx ) {
643
  html += '<iframe' +
644
  ' ' + wppaOvlPdfHtmls[idx] +
645
  ' id="wppa-overlay-img"' +
646
- ' onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);"' +
647
- ' onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);"' +
648
  ' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"' +
649
  ' ontouchend="wppaTouchEnd( event );"' +
650
  ' ontouchmove="wppaTouchMove( event );"' +
@@ -673,8 +660,8 @@ function _wppaOvlShow( idx ) {
673
  else {
674
  html += '<img' +
675
  ' id="wppa-overlay-img"'+
676
- ' onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);"' +
677
- ' onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);"' +
678
  ' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"' +
679
  ' ontouchend="wppaTouchEnd( event );"' +
680
  ' ontouchmove="wppaTouchMove( event );"' +
@@ -777,13 +764,13 @@ function _wppaOvlShow( idx ) {
777
  '</div>';
778
 
779
  // Insert the html
780
- jQuery( '#wppa-overlay-ic' ).html( html );
781
 
782
  // Restore opacity of fs and exit buttons
783
- wppaShowFsButtons();
784
 
785
  // Disable right mouse button
786
- jQuery( '#wppa-overlay-img' ).bind( 'contextmenu', function(e) {
787
  return false;
788
  });
789
 
@@ -794,7 +781,7 @@ function _wppaOvlShow( idx ) {
794
 
795
  // Show fs and exit buttons
796
  if ( wppaOvlFirst ) {
797
- wppaShowFsButtons();
798
  }
799
 
800
  // Done!
@@ -805,14 +792,16 @@ function _wppaOvlShow( idx ) {
805
  // Adjust display sizes
806
  function wppaOvlSize( speed ) {
807
 
 
 
808
  // Panoramas do their own formatting
809
  if ( wppaOvlActivePanorama ) return;
810
 
811
  var img = document.getElementById( 'wppa-overlay-img' ); // Do NOT jquerify this:
812
- var txt = document.getElementById( 'wppa-overlay-txt' ); // jQuery does not support .naturalHeight etc.
813
 
814
  // Are we still visible?
815
- if ( ! img || ! txt || jQuery('#wppa-overlay-bg').css('display') == 'none' ) {
816
  return;
817
  }
818
 
@@ -861,7 +850,7 @@ function wppaOvlSize( speed ) {
861
  }
862
 
863
  var mh; // max image height
864
- var tch = jQuery( '#wppa-overlay-txt' ).height();
865
 
866
  if ( wppaOvlTxtHeight == 'auto' ) {
867
  if ( tch == 0 ) tch = 20 + 2 * wppaOvlBorderWidth;
@@ -899,18 +888,18 @@ function wppaOvlSize( speed ) {
899
  wppaSavedImageHeight = parseInt( wid * nh / nw );
900
  wppaSavedMarginLeft = - parseInt( ( wid / 2 + wppaOvlBorderWidth ) );
901
  wppaSavedContainerWidth = parseInt( wid + 2 * wppaOvlBorderWidth );
902
- wppaSavedContainerHeight = parseInt( wppaSavedImageHeight + wppaOvlBorderWidth + jQuery( '#wppa-overlay-txt-container' ).height() + 20 ); // padding = 10
903
  wppaSavedMarginTop = - parseInt( wppaSavedContainerHeight / 2 );
904
 
905
  // Go to final size
906
- jQuery( '#wppa-overlay-img' ).stop().animate( {
907
  width:wppaSavedImageWidth,
908
  height:wppaSavedImageHeight,
909
  },
910
  speed
911
  );
912
 
913
- jQuery( '#wppa-overlay-ic' ).stop().animate( {
914
  width:wppaSavedContainerWidth,
915
  marginLeft:wppaSavedMarginLeft,
916
  marginTop:wppaSavedMarginTop,
@@ -922,14 +911,11 @@ function wppaOvlSize( speed ) {
922
  // Done?
923
  if ( ! done ) {
924
  setTimeout( function(){ wppaOvlSize(wppaOvlAnimSpeed) }, speed + 10 );
925
- wppaConsoleLog( 'Not done '+wppaOvlIdx+' saved='+wppaSavedImageWidth+', wid='+wid+', cw='+cw+', nw='+nw+
926
- ', img complete='+document.getElementById( 'wppa-overlay-img' ).complete );
927
  }
928
  else {
929
 
930
  // Remove spinner
931
- jQuery( '#wppa-ovl-spin' ).hide();
932
- wppaConsoleLog( 'Done '+wppaOvlIdx );
933
  wppaOvlFirst = false;
934
  }
935
  return true;
@@ -938,6 +924,8 @@ function wppaOvlSize( speed ) {
938
  // Show fullscreen lightbox image
939
  function wppaOvlFormatFull() {
940
 
 
 
941
  // Are we still in?
942
  if ( ! wppaOvlOpen ) {
943
  return;
@@ -1040,54 +1028,37 @@ function wppaOvlFormatFull() {
1040
  margTop = parseInt( margTop );
1041
  imgHeight = parseInt( imgHeight );
1042
  imgWidth = parseInt( imgWidth );
1043
- jQuery(img).css({height:imgHeight,width:imgWidth,marginLeft:margLeft,marginTop:margTop,left:0,top:0,maxWidth:10000});
1044
- jQuery(img).css({visibility:'visible'});
1045
- jQuery( '#wppa-ovl-full-bg' ).css({overflow:Overflow});
1046
- jQuery( '#wppa-ovl-full-bg' ).scrollTop( scrollTop );
1047
- jQuery( '#wppa-ovl-full-bg' ).scrollLeft( scrollLeft );
1048
- jQuery( '#wppa-ovl-spin' ).hide();
1049
 
1050
  // Add navbar
1051
- html = jQuery( '#wppa-overlay-ic' ).html();
1052
  html += '<div style="position:fixed;bottom:0;left:0;right:0;" >' + wppaOvlNavBar() + '</div>';
1053
- jQuery( '#wppa-overlay-ic' ).html( html );
1054
 
1055
  return true; // Done!
1056
  }
1057
 
1058
  // Start audio on the lightbox view
1059
  function wppaOvlStartAudio() {
1060
- wppaConsoleLog( 'wppaOvlStartAudio' );
1061
 
1062
  // Due to a bug in jQuery ( jQuery.play() does not exist ), must do myself:
1063
  var elm = document.getElementById( 'wppa-overlay-audio' );
1064
  if ( elm ) {
1065
  if ( typeof( elm.play ) == 'function' ) {
1066
  elm.play();
1067
- wppaConsoleLog('Audio play '+'wppa-overlay-audio');
1068
- }
1069
- }
1070
- }
1071
-
1072
- // Step through the ring of fullscreen modes
1073
- function wppaOvlStepMode() {
1074
- wppaConsoleLog('wppaOvlStepMode from '+wppaOvlMode);
1075
-
1076
- var modes = new Array( 'normal', 'padded', 'stretched', 'clipped', 'realsize', 'padded' );
1077
- var i = 0;
1078
- while ( i < modes.length ) {
1079
- if ( wppaOvlMode == modes[i] ) {
1080
- wppaOvlMode = modes[i+1];
1081
- wppaOvlShow( wppaOvlIdx );
1082
- return;
1083
  }
1084
- i++;
1085
  }
1086
  }
1087
 
1088
  // Start / stop lightbox slideshow
1089
  function wppaOvlStartStop() {
1090
- wppaConsoleLog('wppaOvlStartStop called. Running='+wppaOvlRunning);
 
1091
 
1092
  // Running?
1093
  if ( wppaOvlRunning ) {
@@ -1100,17 +1071,17 @@ wppaConsoleLog('wppaOvlStartStop called. Running='+wppaOvlRunning);
1100
 
1101
  // NOT first, show prev button
1102
  if ( wppaOvlIdx != 0 ) {
1103
- jQuery( '#wppa-ovl-prev-btn' ).css('visibility', 'visible');
1104
  }
1105
 
1106
  // NOT last, show next button
1107
  if ( wppaOvlIdx != ( wppaOvlUrls.length-1 ) ) {
1108
- jQuery( '#wppa-ovl-next-btn' ).css('visibility', 'visible');
1109
  }
1110
 
1111
  // Hide stop, show start buttn
1112
- jQuery( '#wppa-ovl-stop-btn' ).hide();
1113
- jQuery( '#wppa-ovl-start-btn' ).show();
1114
 
1115
  }
1116
  }
@@ -1127,7 +1098,6 @@ wppaConsoleLog('wppaOvlStartStop called. Running='+wppaOvlRunning);
1127
 
1128
  // Start lb slideshow
1129
  function wppaOvlRun() {
1130
- wppaConsoleLog( 'wppaOvlRun, running='+wppaOvlRunning );
1131
 
1132
  // Already running?
1133
  if ( ! wppaOvlRunning ) return;
@@ -1143,7 +1113,6 @@ wppaConsoleLog( 'wppaOvlRun, running='+wppaOvlRunning );
1143
  var elm = document.getElementById( 'wppa-overlay-img' );
1144
  if ( elm ) {
1145
  if ( ! wppaIsIe && ! elm.complete ) {
1146
- wppaConsoleLog( 'Wait during run' );
1147
  setTimeout( 'wppaOvlRun()', 50 );
1148
  return;
1149
  }
@@ -1164,7 +1133,6 @@ wppaConsoleLog( 'wppaOvlRun, running='+wppaOvlRunning );
1164
 
1165
  // One back in the set
1166
  function wppaOvlShowPrev() {
1167
- wppaConsoleLog( 'wppaOvlShowPrev' );
1168
 
1169
  // Not on a single image
1170
  if ( wppaOvlIsSingle ) return false;
@@ -1181,7 +1149,6 @@ wppaConsoleLog( 'wppaOvlShowPrev' );
1181
 
1182
  // One further in the set
1183
  function wppaOvlShowNext() {
1184
- wppaConsoleLog( 'wppaOvlShowNext' );
1185
 
1186
  // Not on a single image
1187
  if ( wppaOvlIsSingle ) return false;
@@ -1202,6 +1169,8 @@ wppaConsoleLog( 'wppaOvlShowNext' );
1202
  // Quit lightbox mode
1203
  function wppaOvlHide() {
1204
 
 
 
1205
  // Stop audio
1206
  wppaStopAudio();
1207
 
@@ -1211,23 +1180,23 @@ function wppaOvlHide() {
1211
  }
1212
 
1213
  // Clear image container
1214
- jQuery( '#wppa-overlay-ic' ).html( '' );
1215
 
1216
  // Remove background
1217
- jQuery( '#wppa-overlay-bg' ).fadeOut( 300 );
1218
 
1219
  // Remove kb handler
1220
- jQuery( document ).off( 'keydown', wppaOvlKeyboardHandler );
1221
  wppaKbHandlerInstalled = false;
1222
 
1223
  // Reset switches
1224
  wppaOvlFirst = true;
1225
  wppaOvlRunning = false;
1226
- wppaOvlMode = wppaOvlModeInitial;
1227
- jQuery( '#wppa-ovl-spin' ).hide();
1228
 
1229
  // Remove spinner
1230
- jQuery( '#wppa-ovl-spin' ).hide();
1231
 
1232
  // Stop any panorama from running the wppaRenderer
1233
  wppaOvlActivePanorama = 0;
@@ -1243,10 +1212,10 @@ function wppaOvlHide() {
1243
  }
1244
 
1245
  // Trigger lightbox end event
1246
- jQuery(window).trigger( 'wppalightboxend' );
1247
 
1248
  // Fake a window reize
1249
- jQuery(window).trigger('resize');
1250
  }
1251
 
1252
  // Perform onclick action
@@ -1277,9 +1246,11 @@ function wppaOvlOnclick( event ) {
1277
  // Initialize <a> tags with onclick and ontouchstart events to lightbox
1278
  function wppaInitOverlay() {
1279
 
 
 
1280
  // First find subtitles for non-wppa images
1281
- jQuery( '.wp-caption' ).each( function() {
1282
- var div = jQuery( this );
1283
  var title = div.find( 'IMG[alt]' ).attr( 'alt' ) || '';
1284
  var description = div.find( '.wp-caption-text' ).html() || '';
1285
  var a = div.find( 'a' );
@@ -1293,7 +1264,7 @@ function wppaInitOverlay() {
1293
  wppaOvlMode = wppaOvlModeInitial;
1294
  }
1295
 
1296
- var anchors = jQuery( 'a' );
1297
  var anchor;
1298
  var i;
1299
  var temp = [];
@@ -1316,8 +1287,8 @@ function wppaInitOverlay() {
1316
  for ( i = 0; i < anchors.length; i++ ) {
1317
 
1318
  anchor = anchors[i];
1319
- if ( jQuery( anchor ).attr( 'data-rel' ) ) {
1320
- temp = jQuery( anchor ).attr( 'data-rel' ).split( "[" );
1321
  }
1322
  else if ( anchor.rel ) {
1323
  temp = anchor.rel.split( "[" );
@@ -1332,7 +1303,7 @@ function wppaInitOverlay() {
1332
  wppaWppaOverlayActivated = true;
1333
 
1334
  // Install onclick handler
1335
- jQuery( anchor ).on( 'click', function( event ) {
1336
  wppaOvlShow( this );
1337
  event.preventDefault();
1338
  });
@@ -1340,13 +1311,13 @@ function wppaInitOverlay() {
1340
  // Set cursor to magnifier
1341
  switch ( wppaMagnifierCursor ) {
1342
  case 'pointer':
1343
- jQuery( anchor ).css( 'cursor', 'pointer' );
1344
  break;
1345
  case '':
1346
- jQuery( anchor ).css( 'cursor', 'default' );
1347
  break;
1348
  default:
1349
- jQuery( anchor ).css( 'cursor', 'url( ' + wppaImageDirectory + wppaMagnifierCursor + ' ),auto' );
1350
  }
1351
 
1352
  }
@@ -1358,13 +1329,15 @@ function wppaInitOverlay() {
1358
  }
1359
 
1360
  // Install fullscreen navigation bar positioning
1361
- jQuery(window).on('DOMContentLoaded load resize wppascrollend orientationchange', wppaAdjustControlbar );
1362
  }
1363
 
1364
  // In fullscreen mode, place the controlbar at the bottom of the screen, 100$ wide
1365
  // Check max iconsizes
1366
  function wppaAdjustControlbar() {
1367
 
 
 
1368
  // Is lightbox active?
1369
  if ( wppaOvlOpen ) {
1370
 
@@ -1372,7 +1345,7 @@ function wppaAdjustControlbar() {
1372
  if ( wppaOvlMode != 'normal' ) {
1373
 
1374
  // Adjust ctrlbar
1375
- jQuery( ".wppa-pctl-div-lb" ).css({
1376
  position:"fixed",
1377
  left:0,
1378
  right:0,
@@ -1381,25 +1354,25 @@ function wppaAdjustControlbar() {
1381
  });
1382
 
1383
  // Adjust wrapper
1384
- jQuery( "#wppa-ovl-wrap" ).css({
1385
  width:screen.width,
1386
  height:screen.height
1387
  });
1388
  }
1389
 
1390
  // Check iconsizes
1391
- var barWidth = jQuery( ".wppa-pctl-div-lb" ).width();
1392
  if ( barWidth < 12 * ( parseInt( wppaOvlIconSize ) + 4 ) ) {
1393
  newHeight = parseInt( barWidth / 12 - 4 );
1394
 
1395
  if ( newHeight > 0 ) {
1396
- jQuery( ".wppa-pctl-div-lb" ).find( "svg" ).css({height:newHeight,width:newHeight});
1397
- jQuery( ".wppa-pctl-div-lb" ).find( "span" ).css({height:newHeight,width:newHeight});
1398
  }
1399
  }
1400
 
1401
  // Make it visible
1402
- jQuery( ".wppa-pctl-div-lb" ).css({visibility:"visible"});
1403
  }
1404
  }
1405
 
@@ -1409,7 +1382,6 @@ function wppaAdjustControlbar() {
1409
  // Change to: <a onclick="myproc(); wppaOvlResize()" >Show Details</a>
1410
  // Isn't it simple?
1411
  function wppaOvlResize() {
1412
- wppaConsoleLog( 'wppaOvlResize' );
1413
 
1414
  // Panoramas do their own resize
1415
  if ( wppaOvlActivePanorama > 0 ) {
@@ -1427,21 +1399,23 @@ wppaConsoleLog( 'wppaOvlResize' );
1427
  // (re)-Display the fs and exit buttons at the current opacity
1428
  function wppaShowFsButtons() {
1429
 
 
 
1430
  if ( wppaOvlMode == 'normal' ) {
1431
- jQuery( '#wppa-exit-fulls-btn-2' ).hide();
1432
- jQuery( '#wppa-fulls-btn-2' ).show();
1433
  }
1434
  else {
1435
- jQuery( '#wppa-exit-fulls-btn-2' ).show();
1436
- jQuery( '#wppa-fulls-btn-2' ).hide();
1437
  }
1438
 
1439
  if ( ! wppaOvlIsSingle ) {
1440
  if ( wppaOvlRunning ) {
1441
- jQuery( '#wppa-ovl-stop-btn' ).show();
1442
  }
1443
  else {
1444
- jQuery( '#wppa-ovl-start-btn' ).show();
1445
  }
1446
  }
1447
  }
@@ -1517,7 +1491,7 @@ function wppaOvlNavBar() {
1517
 
1518
  // The fs buttons
1519
  // Mobile is always on fullscreen mode
1520
- if ( ! wppaIsMobile ) {
1521
  html +=
1522
  '<span' +
1523
  ' id="wppa-fulls-btn-2"' +
@@ -1535,9 +1509,7 @@ function wppaOvlNavBar() {
1535
  ' >' +
1536
  wppaSvgHtml( 'Exit-Full-Screen-2', wppaOvlIconSize, true, true ) +
1537
  '</span>';
1538
- }
1539
 
1540
  return html;
1541
  }
1542
-
1543
- wppaConsoleLog( 'wppa-lightbox.js version '+wppaLightboxVersion+' loaded.', 'force' );
3
  // Conatins lightbox modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ // version 7.5.03
7
+ //
8
 
9
  // Global inits
10
  var wppaIsVideo = false;
97
  case 's':
98
  wppaOvlStartStop();
99
  break;
 
 
 
 
 
100
  case 'f':
101
  wppaOvlFull();
102
  break;
 
 
 
103
  case 'q':
104
  case 'x':
105
  wppaStopVideo( 0 );
108
  }
109
  wppaOvlHide();
110
  break;
 
111
  }
112
 
113
  return false;
114
  }
115
 
116
+ // Switch to fullscreen mode
117
+ function wppaOvlFull() {
118
 
119
  // Init
 
120
  var elem = document.getElementById( 'wppa-overlay-ic' );
121
  if ( ! elem ) return;
122
 
123
+ wppaOvlMode = 'padded';
 
 
 
 
124
 
125
+ // Go to fullscreen mode
126
+ if ( ! jQuery.fullscreen.isFullScreen() ) {
127
+ jQuery('#wppa-overlay-ic').fullscreen();
 
128
  }
129
 
130
  // Update buttons
145
  wppaOvlMode = 'normal';
146
 
147
  // Cancel fullscreen.
148
+ if ( jQuery.fullscreen.isFullScreen() ) {
149
+ jQuery.fullscreen.exit();
150
+ }
151
 
 
152
  if ( exit ) {
 
153
  return;
154
  }
155
 
168
 
169
  var panData;
170
  var dotPos;
171
+ var $ = jQuery;
172
 
173
  // Panorama requires image container top=0 left=0
174
  // Non panorama: 50%
175
  if ( wppaOvlActivePanorama > 0 ) {
176
+ $( '#wppa-overlay-ic' ).css({top:0,left:0});
177
  }
178
  else {
179
+ $( '#wppa-overlay-ic' ).css({top:'50%',left:'50%'});
180
  }
181
 
182
  // Do the setup right after the invocation of the lightbox
183
  if ( wppaOvlFirst ) {
184
 
185
  // Prevent Weaver ii from hiding us
186
+ $( '#weaver-final' ).removeClass( 'wvr-hide-bang' );
187
 
188
  // Init background
189
+ $( '#wppa-overlay-bg' ).stop().fadeTo( 3, wppaOvlOpacity );
190
 
191
  // Install keyboard handler
192
  if ( ! wppaKbHandlerInstalled ) {
193
+ $( document ).on( 'keydown', wppaOvlKeyboardHandler );
194
  wppaKbHandlerInstalled = true;
195
  }
196
 
197
  // Adjust background size
198
+ $( '#wppa-overlay-bg' ).css({
199
  width:window.innerWidth,
200
  height:window.innerHeight,
201
  });
202
 
 
 
 
 
 
203
  // Trigger lightbox open event
204
+ $(window).trigger( 'wppalightboxstart' );
205
  }
206
 
207
  // If arg = 'this', setup the array of data
228
  if ( arg.rel ) {
229
  rel = arg.rel;
230
  }
231
+ else if ( $( arg ).attr( 'data-rel' ) ) {
232
+ rel = $( arg ).attr( 'data-rel' );
233
  }
234
  else {
235
  rel = false;
241
  // We are in a set if temp[1] is defined
242
  if ( temp[1] ) {
243
  var setname = temp[1];
244
+ var anchors = $( 'a' );
245
  var anchor;
246
  var i, j = 0;
247
 
248
  // Save the set
249
  for ( i = 0; i < anchors.length; i++ ) {
250
  anchor = anchors[i];
251
+ if ( $( anchor ).attr( 'data-rel' ) ) {
252
+ temp = $( anchor ).attr( 'data-rel' ).split( "[" );
253
  }
254
  else {
255
  temp = false;
258
  if ( temp.length > 1 ) {
259
  if ( temp[0] == 'wppa' && temp[1] == setname ) { // Same set
260
  wppaOvlUrls[j] = anchor.href;
261
+ if ( $( anchor ).attr( 'data-lbtitle' ) ) {
262
+ wppaOvlTitles[j] = wppaRepairScriptTags( $( anchor ).attr( 'data-lbtitle' ) );
263
  }
264
  else {
265
  wppaOvlTitles[j] = wppaRepairScriptTags( anchor.title );
266
  }
267
+ wppaOvlIds[j] = $( anchor ).attr( 'data-id' ) ? $( anchor ).attr( 'data-id' ) : '0';
268
+ wppaOvlAlts[j] = $( anchor ).attr( 'data-alt' ) ? $( anchor ).attr( 'data-alt' ) : '';
269
+ wppaOvlVideoHtmls[j] = $( anchor ).attr( 'data-videohtml' ) ? decodeURI( $( anchor ).attr( 'data-videohtml' ) ) : '';
270
+ wppaOvlPdfHtmls[j] = $( anchor ).attr( 'data-pdfhtml' ) ? decodeURI( $( anchor ).attr( 'data-pdfhtml' ) ) : '';
271
+ wppaOvlAudioHtmls[j] = $( anchor ).attr( 'data-audiohtml' ) ? decodeURI( $( anchor ).attr( 'data-audiohtml' ) ) : '';
272
+ wppaOvlVideoNaturalWidths[j] = $( anchor ).attr( 'data-videonatwidth' ) ? $( anchor ).attr( 'data-videonatwidth' ) : '';
273
+ wppaOvlVideoNaturalHeights[j] = $( anchor ).attr( 'data-videonatheight' ) ? $( anchor ).attr( 'data-videonatheight' ) : '';
274
+ panData = $( anchor ).attr( 'data-panorama' ) ? $( anchor ).attr( 'data-panorama' ) : '';
275
 
276
  if ( panData.length > 0 ) {
277
  wppaOvlHasPanoramas = true;
287
  // Is this the one we asked for?
288
  // If its not a stub file, one can look at the arg.href (old method).
289
  // So, now we look at data-pdfhtml, data-videohtml, data-audiohtml as well as arg.href
290
+ if ( decodeURI( $( anchor ).attr( 'data-pdfhtml' ) ) == decodeURI( $( arg ).attr( 'data-pdfhtml' ) ) &&
291
+ decodeURI( $( anchor ).attr( 'data-videohtml' ) ) == decodeURI( $( arg ).attr( 'data-videohtml' ) ) &&
292
+ decodeURI( $( anchor ).attr( 'data-audiohtml' ) ) == decodeURI( $( arg ).attr( 'data-audiohtml' ) ) &&
293
  anchor.href == arg.href ) {
294
  wppaOvlIdx = j; // Current index
 
295
  }
296
  j++;
297
  }
302
  // Single image, treat as set with one element
303
  else {
304
  wppaOvlUrls[0] = arg.href;
305
+ if ( $( arg ).attr( 'data-lbtitle' ) ) {
306
+ wppaOvlTitles[0] = wppaRepairScriptTags( $( arg ).attr( 'data-lbtitle' ) );
307
  }
308
  else {
309
  wppaOvlTitles[0] = wppaRepairScriptTags( arg.title );
310
  }
311
+ wppaOvlIds[0] = $( arg ).attr( 'data-id' ) ? $( arg ).attr( 'data-id' ) : '0';
312
+ wppaOvlAlts[0] = $( arg ).attr( 'data-alt' ) ? $( arg ).attr( 'data-alt' ) : '';
313
+ wppaOvlVideoHtmls[0] = $( arg ).attr( 'data-videohtml' ) ? decodeURI( $( arg ).attr( 'data-videohtml' ) ) : '';
314
+ wppaOvlAudioHtmls[0] = $( arg ).attr( 'data-audiohtml' ) ? decodeURI( $( arg ).attr( 'data-audiohtml' ) ) : '';
315
+ wppaOvlPdfHtmls[0] = $( arg ).attr( 'data-pdfhtml' ) ? decodeURI( $( arg ).attr( 'data-pdfhtml' ) ) : '';
316
+ wppaOvlVideoNaturalWidths[0] = $( arg ).attr( 'data-videonatwidth' ) ? $( arg ).attr( 'data-videonatwidth' ) : '';
317
+ wppaOvlVideoNaturalHeights[0] = $( arg ).attr( 'data-videonatheight' ) ? $( arg ).attr( 'data-videonatheight' ) : '';
318
+ panData = $( arg ).attr( 'data-panorama' ) ? $( arg ).attr( 'data-panorama' ) : '';
319
 
320
  if ( panData.length > 0 ) {
321
  wppaOvlHasPanoramas = true;
347
  // idx is the numeric index to current lightbox set
348
  function _wppaOvlShow( idx ) {
349
 
350
+ var $ = jQuery;
351
+
352
  // Globalize index
353
  wppaOvlCurIdx = idx;
354
 
355
  // Show spinner
356
  if ( wppaOvlFirst ) {
357
+ $( "#wppa-ovl-spin" ).show();
358
  }
359
 
360
  // Find handy switches
367
  if ( wppaOvlUrls[idx].length > 0 && ! wppaIsVideo ) {
368
  wppaOvlImgs[idx] = new Image();
369
  wppaOvlImgs[idx].src = wppaOvlUrls[idx]; // Preload
 
370
  if ( ! wppaIsIe && ! wppaOvlImgs[idx].complete && wppaOvlOpen ) {
 
371
  setTimeout( '_wppaOvlShow(' + idx + ')', 500 );
372
  return;
373
  }
387
  if ( wppaOvlVideoHtmls[next] == '' && wppaOvlOpen ) {
388
  wppaOvlImgs[next] = new Image();
389
  wppaOvlImgs[next].src = wppaOvlUrls[next]; // Preload
 
390
  }
391
 
392
  // Preload previous ( for hitting the prev button )
402
  if ( wppaOvlVideoHtmls[prev] == '' ) {
403
  wppaOvlImgs[prev] = new Image();
404
  wppaOvlImgs[prev].src = wppaOvlUrls[prev]; // Preload
 
405
  }
406
  }
407
 
415
  // Non panorama: 50%
416
  if ( wppaOvlPanoramaIds[idx] > 0 ) {
417
  wppaOvlActivePanorama = wppaOvlPanoramaIds[idx];
418
+ $( '#wppa-overlay-ic' ).css({top:0,left:0});
419
  }
420
  else {
421
  wppaOvlActivePanorama = 0;
422
+ $( '#wppa-overlay-ic' ).css({top:'50%',left:'50%',display:'block'});
423
+ }
424
+
425
+ // Initialize screen mode
426
+ if ( wppaOvlMode == '' ) {
427
+
428
+ if ( wppaOvlModeInitial == 'normal' ) {
429
+ wppaOvlNorm();
430
+ }
431
+ else {
432
+ wppaOvlFull();
433
+ }
434
  }
435
 
436
  // Fullsize?
439
 
440
  // Fullsize panorama?
441
  if ( wppaOvlActivePanorama ) {
442
+ html = wppaOvlPanoramaHtml[idx];
 
 
 
443
  }
444
 
445
  // Fullsize Video
531
  if ( ( ! wppaIsVideo && ! wppaHasAudio ) || wppaOvlFsPhotoId != wppaPhotoId || wppaPhotoId == 0 ) {
532
  wppaStopVideo( 0 );
533
  wppaStopAudio();
534
+ $( '#wppa-overlay-ic' ).html( html );
535
  }
536
 
537
  // If panorama and single, hide panorama browse buttons
538
  if ( wppaOvlPanoramaIds[idx] > 0 && wppaOvlIsSingle ) {
539
+ $( '.wppa-pan-prevnext' ).hide();
540
  }
541
 
542
  // Disable right mouse button optionally
554
  wppaOvlFirst = false;
555
 
556
  // Update buttons
557
+ setTimeout( function(){wppaShowFsButtons()}, 30 );
558
 
559
  return false;
560
  }
573
  var showNav = wppaOvlUrls.length > 1;
574
 
575
  // Initial sizing of image container ( contains image, borders and subtext )
576
+ $( '#wppa-overlay-ic' ).css( {
577
  width:wppaSavedContainerWidth,
578
  marginLeft:wppaSavedMarginLeft,
579
  marginTop:wppaSavedMarginTop,
590
 
591
  html += '<video' +
592
  ' id="wppa-overlay-img"' +
593
+ ' onmouseover="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);"' +
594
+ ' onmouseout="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);"' +
595
  ' preload="metadata"' +
596
  ( wppaOvlVideoStart ? ' autoplay' : '' ) +
597
  ' onpause="wppaOvlVideoPlaying = false;"' +
630
  html += '<iframe' +
631
  ' ' + wppaOvlPdfHtmls[idx] +
632
  ' id="wppa-overlay-img"' +
633
+ ' onmouseover="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);"' +
634
+ ' onmouseout="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);"' +
635
  ' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"' +
636
  ' ontouchend="wppaTouchEnd( event );"' +
637
  ' ontouchmove="wppaTouchMove( event );"' +
660
  else {
661
  html += '<img' +
662
  ' id="wppa-overlay-img"'+
663
+ ' onmouseover="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);"' +
664
+ ' onmouseout="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);"' +
665
  ' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );"' +
666
  ' ontouchend="wppaTouchEnd( event );"' +
667
  ' ontouchmove="wppaTouchMove( event );"' +
764
  '</div>';
765
 
766
  // Insert the html
767
+ $( '#wppa-overlay-ic' ).html( html );
768
 
769
  // Restore opacity of fs and exit buttons
770
+ setTimeout( function(){wppaShowFsButtons()}, 30 );
771
 
772
  // Disable right mouse button
773
+ $( '#wppa-overlay-img' ).bind( 'contextmenu', function(e) {
774
  return false;
775
  });
776
 
781
 
782
  // Show fs and exit buttons
783
  if ( wppaOvlFirst ) {
784
+ setTimeout( function(){wppaShowFsButtons()}, 30 );
785
  }
786
 
787
  // Done!
792
  // Adjust display sizes
793
  function wppaOvlSize( speed ) {
794
 
795
+ var $ = jQuery;
796
+
797
  // Panoramas do their own formatting
798
  if ( wppaOvlActivePanorama ) return;
799
 
800
  var img = document.getElementById( 'wppa-overlay-img' ); // Do NOT jquerify this:
801
+ var txt = document.getElementById( 'wppa-overlay-txt' ); // $ does not support .naturalHeight etc.
802
 
803
  // Are we still visible?
804
+ if ( ! img || ! txt || $('#wppa-overlay-bg').css('display') == 'none' ) {
805
  return;
806
  }
807
 
850
  }
851
 
852
  var mh; // max image height
853
+ var tch = $( '#wppa-overlay-txt' ).height();
854
 
855
  if ( wppaOvlTxtHeight == 'auto' ) {
856
  if ( tch == 0 ) tch = 20 + 2 * wppaOvlBorderWidth;
888
  wppaSavedImageHeight = parseInt( wid * nh / nw );
889
  wppaSavedMarginLeft = - parseInt( ( wid / 2 + wppaOvlBorderWidth ) );
890
  wppaSavedContainerWidth = parseInt( wid + 2 * wppaOvlBorderWidth );
891
+ wppaSavedContainerHeight = parseInt( wppaSavedImageHeight + wppaOvlBorderWidth + $( '#wppa-overlay-txt-container' ).height() + 20 ); // padding = 10
892
  wppaSavedMarginTop = - parseInt( wppaSavedContainerHeight / 2 );
893
 
894
  // Go to final size
895
+ $( '#wppa-overlay-img' ).stop().animate( {
896
  width:wppaSavedImageWidth,
897
  height:wppaSavedImageHeight,
898
  },
899
  speed
900
  );
901
 
902
+ $( '#wppa-overlay-ic' ).stop().animate( {
903
  width:wppaSavedContainerWidth,
904
  marginLeft:wppaSavedMarginLeft,
905
  marginTop:wppaSavedMarginTop,
911
  // Done?
912
  if ( ! done ) {
913
  setTimeout( function(){ wppaOvlSize(wppaOvlAnimSpeed) }, speed + 10 );
 
 
914
  }
915
  else {
916
 
917
  // Remove spinner
918
+ $( '#wppa-ovl-spin' ).hide();
 
919
  wppaOvlFirst = false;
920
  }
921
  return true;
924
  // Show fullscreen lightbox image
925
  function wppaOvlFormatFull() {
926
 
927
+ var $ = jQuery;
928
+
929
  // Are we still in?
930
  if ( ! wppaOvlOpen ) {
931
  return;
1028
  margTop = parseInt( margTop );
1029
  imgHeight = parseInt( imgHeight );
1030
  imgWidth = parseInt( imgWidth );
1031
+ $(img).css({height:imgHeight,width:imgWidth,marginLeft:margLeft,marginTop:margTop,left:0,top:0,maxWidth:10000});
1032
+ $(img).css({visibility:'visible'});
1033
+ $( '#wppa-ovl-full-bg' ).css({overflow:Overflow});
1034
+ $( '#wppa-ovl-full-bg' ).scrollTop( scrollTop );
1035
+ $( '#wppa-ovl-full-bg' ).scrollLeft( scrollLeft );
1036
+ $( '#wppa-ovl-spin' ).hide();
1037
 
1038
  // Add navbar
1039
+ html = $( '#wppa-overlay-ic' ).html();
1040
  html += '<div style="position:fixed;bottom:0;left:0;right:0;" >' + wppaOvlNavBar() + '</div>';
1041
+ $( '#wppa-overlay-ic' ).html( html );
1042
 
1043
  return true; // Done!
1044
  }
1045
 
1046
  // Start audio on the lightbox view
1047
  function wppaOvlStartAudio() {
 
1048
 
1049
  // Due to a bug in jQuery ( jQuery.play() does not exist ), must do myself:
1050
  var elm = document.getElementById( 'wppa-overlay-audio' );
1051
  if ( elm ) {
1052
  if ( typeof( elm.play ) == 'function' ) {
1053
  elm.play();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1054
  }
 
1055
  }
1056
  }
1057
 
1058
  // Start / stop lightbox slideshow
1059
  function wppaOvlStartStop() {
1060
+
1061
+ var $ = jQuery;
1062
 
1063
  // Running?
1064
  if ( wppaOvlRunning ) {
1071
 
1072
  // NOT first, show prev button
1073
  if ( wppaOvlIdx != 0 ) {
1074
+ $( '#wppa-ovl-prev-btn' ).css('visibility', 'visible');
1075
  }
1076
 
1077
  // NOT last, show next button
1078
  if ( wppaOvlIdx != ( wppaOvlUrls.length-1 ) ) {
1079
+ $( '#wppa-ovl-next-btn' ).css('visibility', 'visible');
1080
  }
1081
 
1082
  // Hide stop, show start buttn
1083
+ $( '#wppa-ovl-stop-btn' ).hide();
1084
+ $( '#wppa-ovl-start-btn' ).show();
1085
 
1086
  }
1087
  }
1098
 
1099
  // Start lb slideshow
1100
  function wppaOvlRun() {
 
1101
 
1102
  // Already running?
1103
  if ( ! wppaOvlRunning ) return;
1113
  var elm = document.getElementById( 'wppa-overlay-img' );
1114
  if ( elm ) {
1115
  if ( ! wppaIsIe && ! elm.complete ) {
 
1116
  setTimeout( 'wppaOvlRun()', 50 );
1117
  return;
1118
  }
1133
 
1134
  // One back in the set
1135
  function wppaOvlShowPrev() {
 
1136
 
1137
  // Not on a single image
1138
  if ( wppaOvlIsSingle ) return false;
1149
 
1150
  // One further in the set
1151
  function wppaOvlShowNext() {
 
1152
 
1153
  // Not on a single image
1154
  if ( wppaOvlIsSingle ) return false;
1169
  // Quit lightbox mode
1170
  function wppaOvlHide() {
1171
 
1172
+ var $ = jQuery;
1173
+
1174
  // Stop audio
1175
  wppaStopAudio();
1176
 
1180
  }
1181
 
1182
  // Clear image container
1183
+ $( '#wppa-overlay-ic' ).html( '' );
1184
 
1185
  // Remove background
1186
+ $( '#wppa-overlay-bg' ).fadeOut( 300 );
1187
 
1188
  // Remove kb handler
1189
+ $( document ).off( 'keydown', wppaOvlKeyboardHandler );
1190
  wppaKbHandlerInstalled = false;
1191
 
1192
  // Reset switches
1193
  wppaOvlFirst = true;
1194
  wppaOvlRunning = false;
1195
+ wppaOvlMode = '';
1196
+ $( '#wppa-ovl-spin' ).hide();
1197
 
1198
  // Remove spinner
1199
+ $( '#wppa-ovl-spin' ).hide();
1200
 
1201
  // Stop any panorama from running the wppaRenderer
1202
  wppaOvlActivePanorama = 0;
1212
  }
1213
 
1214
  // Trigger lightbox end event
1215
+ $(window).trigger( 'wppalightboxend' );
1216
 
1217
  // Fake a window reize
1218
+ $(window).trigger('resize');
1219
  }
1220
 
1221
  // Perform onclick action
1246
  // Initialize <a> tags with onclick and ontouchstart events to lightbox
1247
  function wppaInitOverlay() {
1248
 
1249
+ var $ = jQuery;
1250
+
1251
  // First find subtitles for non-wppa images
1252
+ $( '.wp-caption' ).each( function() {
1253
+ var div = $( this );
1254
  var title = div.find( 'IMG[alt]' ).attr( 'alt' ) || '';
1255
  var description = div.find( '.wp-caption-text' ).html() || '';
1256
  var a = div.find( 'a' );
1264
  wppaOvlMode = wppaOvlModeInitial;
1265
  }
1266
 
1267
+ var anchors = $( 'a' );
1268
  var anchor;
1269
  var i;
1270
  var temp = [];
1287
  for ( i = 0; i < anchors.length; i++ ) {
1288
 
1289
  anchor = anchors[i];
1290
+ if ( $( anchor ).attr( 'data-rel' ) ) {
1291
+ temp = $( anchor ).attr( 'data-rel' ).split( "[" );
1292
  }
1293
  else if ( anchor.rel ) {
1294
  temp = anchor.rel.split( "[" );
1303
  wppaWppaOverlayActivated = true;
1304
 
1305
  // Install onclick handler
1306
+ $( anchor ).on( 'click', function( event ) {
1307
  wppaOvlShow( this );
1308
  event.preventDefault();
1309
  });
1311
  // Set cursor to magnifier
1312
  switch ( wppaMagnifierCursor ) {
1313
  case 'pointer':
1314
+ $( anchor ).css( 'cursor', 'pointer' );
1315
  break;
1316
  case '':
1317
+ $( anchor ).css( 'cursor', 'default' );
1318
  break;
1319
  default:
1320
+ $( anchor ).css( 'cursor', 'url( ' + wppaImageDirectory + wppaMagnifierCursor + ' ),auto' );
1321
  }
1322
 
1323
  }
1329
  }
1330
 
1331
  // Install fullscreen navigation bar positioning
1332
+ $(window).on('DOMContentLoaded load resize wppascrollend orientationchange', wppaAdjustControlbar );
1333
  }
1334
 
1335
  // In fullscreen mode, place the controlbar at the bottom of the screen, 100$ wide
1336
  // Check max iconsizes
1337
  function wppaAdjustControlbar() {
1338
 
1339
+ var $ = jQuery;
1340
+
1341
  // Is lightbox active?
1342
  if ( wppaOvlOpen ) {
1343
 
1345
  if ( wppaOvlMode != 'normal' ) {
1346
 
1347
  // Adjust ctrlbar
1348
+ $( ".wppa-pctl-div-lb" ).css({
1349
  position:"fixed",
1350
  left:0,
1351
  right:0,
1354
  });
1355
 
1356
  // Adjust wrapper
1357
+ $( "#wppa-ovl-wrap" ).css({
1358
  width:screen.width,
1359
  height:screen.height
1360
  });
1361
  }
1362
 
1363
  // Check iconsizes
1364
+ var barWidth = $( ".wppa-pctl-div-lb" ).width();
1365
  if ( barWidth < 12 * ( parseInt( wppaOvlIconSize ) + 4 ) ) {
1366
  newHeight = parseInt( barWidth / 12 - 4 );
1367
 
1368
  if ( newHeight > 0 ) {
1369
+ $( ".wppa-pctl-div-lb" ).find( "svg" ).css({height:newHeight,width:newHeight});
1370
+ $( ".wppa-pctl-div-lb" ).find( "span" ).css({height:newHeight,width:newHeight});
1371
  }
1372
  }
1373
 
1374
  // Make it visible
1375
+ $( ".wppa-pctl-div-lb" ).css({visibility:"visible"});
1376
  }
1377
  }
1378
 
1382
  // Change to: <a onclick="myproc(); wppaOvlResize()" >Show Details</a>
1383
  // Isn't it simple?
1384
  function wppaOvlResize() {
 
1385
 
1386
  // Panoramas do their own resize
1387
  if ( wppaOvlActivePanorama > 0 ) {
1399
  // (re)-Display the fs and exit buttons at the current opacity
1400
  function wppaShowFsButtons() {
1401
 
1402
+ var $ = jQuery;
1403
+
1404
  if ( wppaOvlMode == 'normal' ) {
1405
+ $( '#wppa-exit-fulls-btn-2' ).hide();
1406
+ $( '#wppa-fulls-btn-2' ).show();
1407
  }
1408
  else {
1409
+ $( '#wppa-exit-fulls-btn-2' ).show();
1410
+ $( '#wppa-fulls-btn-2' ).hide();
1411
  }
1412
 
1413
  if ( ! wppaOvlIsSingle ) {
1414
  if ( wppaOvlRunning ) {
1415
+ $( '#wppa-ovl-stop-btn' ).show();
1416
  }
1417
  else {
1418
+ $( '#wppa-ovl-start-btn' ).show();
1419
  }
1420
  }
1421
  }
1491
 
1492
  // The fs buttons
1493
  // Mobile is always on fullscreen mode
1494
+ // if ( ! wppaIsMobile ) {
1495
  html +=
1496
  '<span' +
1497
  ' id="wppa-fulls-btn-2"' +
1509
  ' >' +
1510
  wppaSvgHtml( 'Exit-Full-Screen-2', wppaOvlIconSize, true, true ) +
1511
  '</span>';
1512
+ // }
1513
 
1514
  return html;
1515
  }
 
 
js/wppa-lightbox.min.js CHANGED
@@ -1 +1 @@
1
- var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaRenderer,wppaScene,wppaCamera,wppaSphere,wppaSphereMaterial,wppaSphereMesh,wppaLightboxVersion="7.5.02",wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlActivePanorama=0,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e=(a=null==p?event.keyCode:p.keyCode,27),t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"d":jQuery("#wppa-ovl-legenda-1").css("visibility","hidden"),jQuery("#wppa-ovl-legenda-2").css("visibility","hidden"),wppaShowLegenda="hidden";break;case"f":wppaOvlFull();break;case"l":wppaOvlNorm();break;case"q":case"x":wppaStopVideo(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(p){var a=wppaOvlMode;document.getElementById("wppa-overlay-ic")&&(!p&&"normal"!=a||(jQuery("#wppa-overlay-ic").fullscreen(),wppaOvlMode="padded"),"normal"!=a&&(jQuery.fullscreen.exit(),wppaOvlMode="normal"),setTimeout(function(){wppaShowFsButtons()},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlNorm(p){document.getElementById("wppa-overlay-ic")&&(wppaOvlMode="normal",jQuery.fullscreen.exit(),p?wppaOvlMode=wppaOvlModeInitial:(setTimeout(function(){wppaShowFsButtons()},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50)))}function wppaOvlShow(p){var a,e;if(0<wppaOvlActivePanorama?jQuery("#wppa-overlay-ic").css({top:0,left:0}):jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%"}),wppaOvlFirst&&(jQuery("#weaver-final").removeClass("wvr-hide-bang"),jQuery("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaKbHandlerInstalled||(jQuery(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),jQuery("#wppa-overlay-bg").css({width:window.innerWidth,height:window.innerHeight}),"normal"!=wppaOvlModeInitial&&wppaOvlFull(!0),jQuery(window).trigger("wppalightboxstart")),"object"==typeof p){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var t=(p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(t[1])for(var l,o=t[1],i=jQuery("a"),n=0,r=0;r<i.length;r++)l=i[r],1<(t=!!jQuery(l).attr("data-rel")&&jQuery(l).attr("data-rel").split("[")).length&&"wppa"==t[0]&&t[1]==o&&(wppaOvlUrls[n]=l.href,jQuery(l).attr("data-lbtitle")?wppaOvlTitles[n]=wppaRepairScriptTags(jQuery(l).attr("data-lbtitle")):wppaOvlTitles[n]=wppaRepairScriptTags(l.title),wppaOvlIds[n]=jQuery(l).attr("data-id")?jQuery(l).attr("data-id"):"0",wppaOvlAlts[n]=jQuery(l).attr("data-alt")?jQuery(l).attr("data-alt"):"",wppaOvlVideoHtmls[n]=jQuery(l).attr("data-videohtml")?decodeURI(jQuery(l).attr("data-videohtml")):"",wppaOvlPdfHtmls[n]=jQuery(l).attr("data-pdfhtml")?decodeURI(jQuery(l).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[n]=jQuery(l).attr("data-audiohtml")?decodeURI(jQuery(l).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[n]=jQuery(l).attr("data-videonatwidth")?jQuery(l).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[n]=jQuery(l).attr("data-videonatheight")?jQuery(l).attr("data-videonatheight"):"",0<(a=jQuery(l).attr("data-panorama")?jQuery(l).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[n]=a.substr(e+1),wppaOvlPanoramaIds[n]=a.substr(0,e)):(wppaOvlPanoramaHtml[n]="",wppaOvlPanoramaIds[n]=0),decodeURI(jQuery(l).attr("data-pdfhtml"))==decodeURI(jQuery(p).attr("data-pdfhtml"))&&decodeURI(jQuery(l).attr("data-videohtml"))==decodeURI(jQuery(p).attr("data-videohtml"))&&decodeURI(jQuery(l).attr("data-audiohtml"))==decodeURI(jQuery(p).attr("data-audiohtml"))&&l.href==p.href&&(wppaOvlIdx=n,wppaConsoleLog("Found "+n+": "+p.href)),n++);else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlIds[0]=jQuery(p).attr("data-id")?jQuery(p).attr("data-id"):"0",wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=jQuery(p).attr("data-pdfhtml")?decodeURI(jQuery(p).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",0<(a=jQuery(p).attr("data-panorama")?jQuery(p).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[0]=a.substr(e+1),wppaOvlPanoramaIds[0]=a.substr(0,e)):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0),wppaOvlIdx=0}else wppaOvlIdx=p;wppaOvlOpen=!0,setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(p){if(wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[p],0<wppaOvlUrls[p].length&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaIsIe&&!wppaOvlImgs[p].complete&&wppaOvlOpen))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",500);var a,e=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1;if(""==wppaOvlVideoHtmls[e]&&wppaOvlOpen&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e],wppaConsoleLog("Preloading > "+(e+1))),!wppaOvlRunning&&wppaOvlOpen&&(a=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[a]&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading < "+(a+1)))),_bumpViewCount(wppaOvlIds[p]),wppaOvlIsSingle=1==wppaOvlUrls.length,0<wppaOvlPanoramaIds[p]?(wppaOvlActivePanorama=wppaOvlPanoramaIds[p],jQuery("#wppa-overlay-ic").css({top:0,left:0})):(wppaOvlActivePanorama=0,jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%",display:"block"})),"normal"!=wppaOvlMode||wppaOvlActivePanorama)return wppaOvlActivePanorama?(l=wppaOvlPanoramaHtml[p]+"<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >",l+="</div>"):wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video></div>":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[p]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" ></iframe></div>':(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[p]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),l+="</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),jQuery("#wppa-overlay-ic").html(l)),0<wppaOvlPanoramaIds[p]&&wppaOvlIsSingle&&jQuery(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaShowFsButtons(),!1;wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);var t="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(t=wppaOvlFontColor);wppaOvlUrls.length;jQuery("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[p]+' id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" ></iframe>':(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[p]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),wppaOvlIsVideo=!1),l+="</div>";var o=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+t+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >',l+=wppaOvlNavBar(),l+=(o?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p],l+="</div>",l+="</div>",jQuery("#wppa-overlay-ic").html(l),wppaShowFsButtons(),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),0==wppaOvlPanoramaIds[p]&&wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),!1}function wppaOvlSize(p){if(!wppaOvlActivePanorama){var a=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(a&&e&&"none"!=jQuery("#wppa-overlay-bg").css("display")){if("normal"==wppaOvlMode){var t,l,o,i,n,r=wppaWindowWidth(),w=wppaWindowHeight(),d=wppaOvlIsVideo?(t=a.clientWidth,l=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(t=.9*wppaWindowWidth(),l=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t=a.clientWidth,l=a.naturalWidth,a.naturalHeight);void 0===l&&(l=a.clientWidth,d=a.clientHeight),(n=(o=(r-3*wppaOvlBorderWidth)/l)<(i=w/d)?o:i)<1&&(l=parseInt(l*n),d=parseInt(d*n));var v=jQuery("#wppa-overlay-txt").height(),s="auto"==wppaOvlTxtHeight?(0==v&&(v=20+2*wppaOvlBorderWidth),w-v-20-2*wppaOvlBorderWidth):w-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,u=parseInt(s*l/d),h=(wppaOvlPadTop,parseInt((r-u)/2),u);d<s&&(wppaOvlPadTop,parseInt((r-l)/2),h=l);var O=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(d=180,O=!(l=h=240)),h=parseInt(h),wppaSavedImageWidth=parseInt(h),wppaSavedImageHeight=parseInt(h*d/l),wppaSavedMarginLeft=-parseInt(h/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(h+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),jQuery("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),O?(jQuery("#wppa-ovl-spin").hide(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):(setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),wppaConsoleLog("Not done "+wppaOvlIdx+" saved="+wppaSavedImageWidth+", wid="+h+", cw="+t+", nw="+l+", img complete="+document.getElementById("wppa-overlay-img").complete)),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){var p,a,e;if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)p=document.getElementById("wppa-overlay-img"),a=screen.width,e=screen.height;else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout("wppaOvlFormatFull()",10);a=p.naturalWidth,e=p.naturalHeight}var t=screen.width/screen.height,l=a/e,o=0,i=0,n=0,r=0,w=0,d=0,v="hidden";switch(wppaOvlMode){case"padded":r=l<t?(o=(screen.width-screen.height*l)/2,i=0,n=screen.height,screen.height*l):(o=0,i=(screen.height-screen.width/l)/2,n=screen.width/l,screen.width);break;case"stretched":i=o=0,n=screen.height,r=screen.width;break;case"clipped":r=l<t?(o=0,i=(screen.height-screen.width/l)/2,n=screen.width/l,screen.width):(o=(screen.width-screen.height*l)/2,i=0,n=screen.height,screen.height*l);break;case"realsize":(o=(screen.width-a)/2)<0&&(d=parseInt(-o),o=0),(i=(screen.height-e)/2)<0&&(w=parseInt(-i),i=0),n=e,r=a,v="auto"}return o=parseInt(o),i=parseInt(i),n=parseInt(n),r=parseInt(r),jQuery(p).css({height:n,width:r,marginLeft:o,marginTop:i,left:0,top:0,maxWidth:1e4}),jQuery(p).css({visibility:"visible"}),jQuery("#wppa-ovl-full-bg").css({overflow:v}),jQuery("#wppa-ovl-full-bg").scrollTop(w),jQuery("#wppa-ovl-full-bg").scrollLeft(d),jQuery("#wppa-ovl-spin").hide(),html=jQuery("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",jQuery("#wppa-overlay-ic").html(html),!0}}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,-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-stop-btn").hide(),jQuery("#wppa-ovl-start-btn").show())):(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=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1;wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(a),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaConsoleLog("wppaOvlShowPrev"),wppaOvlIsSingle||(wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1)),!1}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),wppaOvlIsSingle||(jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1)),!1}function wppaOvlHide(){wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),jQuery("#wppa-overlay-ic").html(""),jQuery("#wppa-overlay-bg").fadeOut(300),jQuery(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,jQuery("#wppa-ovl-spin").hide(),jQuery("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,wppaOvlOpen=!1,document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),jQuery(window).trigger("wppalightboxend"),jQuery(window).trigger("resize")}function wppaOvlOnclick(p){switch(wppaOvlOnclickType){case"none":break;case"close":"normal"==wppaOvlMode&&wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;48<p.clientY&&(a<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}return!0}function 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"),l=a+"<br>"+e;t.attr("data-lbtitle")||t.attr("data-lbtitle",l)}),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var p,a,e=jQuery("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=wppaOvlCurIdx=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),a=0;a<e.length;a++)if(p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0])switch(wppaWppaOverlayActivated=!0,jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaMagnifierCursor){case"pointer":jQuery(p).css("cursor","pointer");break;case"":jQuery(p).css("cursor","default");break;default:jQuery(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaAdjustControlbar)}function wppaAdjustControlbar(){var p;wppaOvlOpen&&("normal"!=wppaOvlMode&&(jQuery(".wppa-pctl-div-lb").css({position:"fixed",left:0,right:0,bottom:0,width:screen.width}),jQuery("#wppa-ovl-wrap").css({width:screen.width,height:screen.height})),(p=jQuery(".wppa-pctl-div-lb").width())<12*(parseInt(wppaOvlIconSize)+4)&&(newHeight=parseInt(p/12-4),0<newHeight&&(jQuery(".wppa-pctl-div-lb").find("svg").css({height:newHeight,width:newHeight}),jQuery(".wppa-pctl-div-lb").find("span").css({height:newHeight,width:newHeight}))),jQuery(".wppa-pctl-div-lb").css({visibility:"visible"}))}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",100))}function wppaShowFsButtons(){"normal"==wppaOvlMode?(jQuery("#wppa-exit-fulls-btn-2").hide(),jQuery("#wppa-fulls-btn-2").show()):(jQuery("#wppa-exit-fulls-btn-2").show(),jQuery("#wppa-fulls-btn-2").hide()),wppaOvlIsSingle||(wppaOvlRunning?jQuery("#wppa-ovl-stop-btn").show():jQuery("#wppa-ovl-start-btn").show())}function wppaOvlImgClick(p){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(p.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var p="";return wppaOvlIsSingle||(p+='<span id="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:inline-block;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-start-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"none":"inline-block")+';" title="Start" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Play-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-stop-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"inline-block":"none")+';" title="Stop" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Pause-Button",wppaOvlIconSize,!0,!0)+"</span>",p+='<span id="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:inline-block;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>"),p+='<span id="wppa-exit-btn-2" style="margin:0 2px;float:right;display:inline-block;" title="Exit" onclick="wppaOvlHide()" >'+wppaSvgHtml("Exit-2",wppaOvlIconSize,!0,!0)+"</span>",wppaIsMobile||(p+='<span id="wppa-fulls-btn-2" style="margin:0 2px;float:right;display:'+("normal"==wppaOvlMode?"inline-block":"none")+';" title="Enter fullscreen" onclick="wppaOvlFull()" >'+wppaSvgHtml("Full-Screen-2",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-exit-fulls-btn-2" style="margin:0 2px;float:right;display:'+("normal"==wppaOvlMode?"none":"inline-block")+';" title="Leave fullscreen" onclick="wppaOvlNorm()" >'+wppaSvgHtml("Exit-Full-Screen-2",wppaOvlIconSize,!0,!0)+"</span>"),p}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()}),wppaConsoleLog("wppa-lightbox.js version "+wppaLightboxVersion+" loaded.","force");
1
+ var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaRenderer,wppaScene,wppaCamera,wppaSphere,wppaSphereMaterial,wppaSphereMesh,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlActivePanorama=0,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(a){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(a){var p,e=(p=null==a?event.keyCode:a.keyCode,27),t=String.fromCharCode(p).toLowerCase();switch(p){case e:wppaStopVideo(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"f":wppaOvlFull();break;case"q":case"x":wppaStopVideo(0),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(){document.getElementById("wppa-overlay-ic")&&(wppaOvlMode="padded",jQuery.fullscreen.isFullScreen()||jQuery("#wppa-overlay-ic").fullscreen(),setTimeout(function(){wppaShowFsButtons()},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlNorm(a){document.getElementById("wppa-overlay-ic")&&(wppaOvlMode="normal",jQuery.fullscreen.isFullScreen()&&jQuery.fullscreen.exit(),a||(setTimeout(function(){wppaShowFsButtons()},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50)))}function wppaOvlShow(a){var p,e,t=jQuery;if(0<wppaOvlActivePanorama?t("#wppa-overlay-ic").css({top:0,left:0}):t("#wppa-overlay-ic").css({top:"50%",left:"50%"}),wppaOvlFirst&&(t("#weaver-final").removeClass("wvr-hide-bang"),t("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaKbHandlerInstalled||(t(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),t("#wppa-overlay-bg").css({width:window.innerWidth,height:window.innerHeight}),t(window).trigger("wppalightboxstart")),"object"==typeof a){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var l=(a.rel?a.rel:!!t(a).attr("data-rel")&&t(a).attr("data-rel")).split("[");if(l[1])for(var o,i=l[1],n=t("a"),w=0,d=0;d<n.length;d++)1<(l=!!t(o=n[d]).attr("data-rel")&&t(o).attr("data-rel").split("[")).length&&"wppa"==l[0]&&l[1]==i&&(wppaOvlUrls[w]=o.href,t(o).attr("data-lbtitle")?wppaOvlTitles[w]=wppaRepairScriptTags(t(o).attr("data-lbtitle")):wppaOvlTitles[w]=wppaRepairScriptTags(o.title),wppaOvlIds[w]=t(o).attr("data-id")?t(o).attr("data-id"):"0",wppaOvlAlts[w]=t(o).attr("data-alt")?t(o).attr("data-alt"):"",wppaOvlVideoHtmls[w]=t(o).attr("data-videohtml")?decodeURI(t(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[w]=t(o).attr("data-pdfhtml")?decodeURI(t(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[w]=t(o).attr("data-audiohtml")?decodeURI(t(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[w]=t(o).attr("data-videonatwidth")?t(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[w]=t(o).attr("data-videonatheight")?t(o).attr("data-videonatheight"):"",0<(p=t(o).attr("data-panorama")?t(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=p.indexOf("."),wppaOvlPanoramaHtml[w]=p.substr(e+1),wppaOvlPanoramaIds[w]=p.substr(0,e)):(wppaOvlPanoramaHtml[w]="",wppaOvlPanoramaIds[w]=0),decodeURI(t(o).attr("data-pdfhtml"))==decodeURI(t(a).attr("data-pdfhtml"))&&decodeURI(t(o).attr("data-videohtml"))==decodeURI(t(a).attr("data-videohtml"))&&decodeURI(t(o).attr("data-audiohtml"))==decodeURI(t(a).attr("data-audiohtml"))&&o.href==a.href&&(wppaOvlIdx=w),w++);else wppaOvlUrls[0]=a.href,t(a).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(t(a).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(a.title),wppaOvlIds[0]=t(a).attr("data-id")?t(a).attr("data-id"):"0",wppaOvlAlts[0]=t(a).attr("data-alt")?t(a).attr("data-alt"):"",wppaOvlVideoHtmls[0]=t(a).attr("data-videohtml")?decodeURI(t(a).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=t(a).attr("data-audiohtml")?decodeURI(t(a).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=t(a).attr("data-pdfhtml")?decodeURI(t(a).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=t(a).attr("data-videonatwidth")?t(a).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=t(a).attr("data-videonatheight")?t(a).attr("data-videonatheight"):"",0<(p=t(a).attr("data-panorama")?t(a).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=p.indexOf("."),wppaOvlPanoramaHtml[0]=p.substr(e+1),wppaOvlPanoramaIds[0]=p.substr(0,e)):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0),wppaOvlIdx=0}else wppaOvlIdx=a;wppaOvlOpen=!0,setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(a){var p=jQuery;if(wppaOvlCurIdx=a,wppaOvlFirst&&p("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[a],wppaHasAudio=""!=wppaOvlAudioHtmls[a],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[a],!(0<wppaOvlUrls[a].length)||wppaIsVideo||(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaIsIe||wppaOvlImgs[a].complete||!wppaOvlOpen)){var e,t=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1;if(""==wppaOvlVideoHtmls[t]&&wppaOvlOpen&&(wppaOvlImgs[t]=new Image,wppaOvlImgs[t].src=wppaOvlUrls[t]),!wppaOvlRunning&&wppaOvlOpen&&(e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[e]&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e])),_bumpViewCount(wppaOvlIds[a]),wppaOvlIsSingle=1==wppaOvlUrls.length,0<wppaOvlPanoramaIds[a]?(wppaOvlActivePanorama=wppaOvlPanoramaIds[a],p("#wppa-overlay-ic").css({top:0,left:0})):(wppaOvlActivePanorama=0,p("#wppa-overlay-ic").css({top:"50%",left:"50%",display:"block"})),""==wppaOvlMode&&("normal"==wppaOvlModeInitial?wppaOvlNorm:wppaOvlFull)(),"normal"!=wppaOvlMode||wppaOvlActivePanorama)return wppaOvlActivePanorama?o=wppaOvlPanoramaHtml[a]:wppaIsVideo?o='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video></div>":wppaOvlIsPdf?o='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[a]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" ></iframe></div>':(o='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(o+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),o+="</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),p("#wppa-overlay-ic").html(o)),0<wppaOvlPanoramaIds[a]&&wppaOvlIsSingle&&p(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,setTimeout(function(){wppaShowFsButtons()},30),!1;wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);var l="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(l=wppaOvlFontColor);wppaOvlUrls.length;p("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var o="";o+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(o+='<video id="wppa-overlay-img" onmouseover="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?o+="<iframe "+wppaOvlPdfHtmls[a]+' id="wppa-overlay-img" onmouseover="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" ></iframe>':(o+='<img id="wppa-overlay-img" onmouseover="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="$(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(o+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[a]+"</audio>"),wppaOvlIsVideo=!1),o+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return o+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+l+";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;" >',o+=wppaOvlNavBar(),o+=(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[a],o+="</div>",o+="</div>",p("#wppa-overlay-ic").html(o),setTimeout(function(){wppaShowFsButtons()},30),p("#wppa-overlay-img").bind("contextmenu",function(a){return!1}),0==wppaOvlPanoramaIds[a]&&wppaOvlResize(),wppaOvlFirst&&setTimeout(function(){wppaShowFsButtons()},30),!1}setTimeout("_wppaOvlShow("+a+")",500)}function wppaOvlSize(a){var p=jQuery;if(!wppaOvlActivePanorama){var e=document.getElementById("wppa-overlay-img"),t=document.getElementById("wppa-overlay-txt");if(e&&t&&"none"!=p("#wppa-overlay-bg").css("display")){if("normal"==wppaOvlMode){var l,o,i,n,w=wppaWindowWidth(),d=wppaWindowHeight(),r=wppaOvlIsVideo?(e.clientWidth,l=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),l=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(e.clientWidth,l=e.naturalWidth,e.naturalHeight);void 0===l&&(l=e.clientWidth,r=e.clientHeight),(n=(o=(w-3*wppaOvlBorderWidth)/l)<(i=d/r)?o:i)<1&&(l=parseInt(l*n),r=parseInt(r*n));var v=p("#wppa-overlay-txt").height(),s="auto"==wppaOvlTxtHeight?(0==v&&(v=20+2*wppaOvlBorderWidth),d-v-20-2*wppaOvlBorderWidth):d-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,h=parseInt(s*l/r),c=(wppaOvlPadTop,parseInt((w-h)/2),h);r<s&&(wppaOvlPadTop,parseInt((w-l)/2),c=l);var O=wppaSavedImageWidth-c<3&&c-wppaSavedImageWidth<3;return c<=10&&(r=180,O=!(l=c=240)),c=parseInt(c),wppaSavedImageWidth=parseInt(c),wppaSavedImageHeight=parseInt(c*r/l),wppaSavedMarginLeft=-parseInt(c/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(c+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+p("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),p("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},a),p("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},a),O?(p("#wppa-ovl-spin").hide(),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},a+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){var a,p,e,t=jQuery;if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){if(wppaOvlIsVideo)a=document.getElementById("wppa-overlay-img"),p=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)a=document.getElementById("wppa-overlay-img"),p=screen.width,e=screen.height;else{if(a=document.getElementById("wppa-overlay-img"),!(wppaIsIe||a&&a.complete))return void setTimeout("wppaOvlFormatFull()",10);p=a.naturalWidth,e=a.naturalHeight}var l=screen.width/screen.height,o=p/e,i=0,n=0,w=0,d=0,r=0,v=0,s="hidden";switch(wppaOvlMode){case"padded":d=o<l?(i=(screen.width-screen.height*o)/2,n=0,w=screen.height,screen.height*o):(i=0,n=(screen.height-screen.width/o)/2,w=screen.width/o,screen.width);break;case"stretched":n=i=0,w=screen.height,d=screen.width;break;case"clipped":d=o<l?(i=0,n=(screen.height-screen.width/o)/2,w=screen.width/o,screen.width):(i=(screen.width-screen.height*o)/2,n=0,w=screen.height,screen.height*o);break;case"realsize":(i=(screen.width-p)/2)<0&&(v=parseInt(-i),i=0),(n=(screen.height-e)/2)<0&&(r=parseInt(-n),n=0),w=e,d=p,s="auto"}return i=parseInt(i),n=parseInt(n),w=parseInt(w),d=parseInt(d),t(a).css({height:w,width:d,marginLeft:i,marginTop:n,left:0,top:0,maxWidth:1e4}),t(a).css({visibility:"visible"}),t("#wppa-ovl-full-bg").css({overflow:s}),t("#wppa-ovl-full-bg").scrollTop(r),t("#wppa-ovl-full-bg").scrollLeft(v),t("#wppa-ovl-spin").hide(),html=t("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",t("#wppa-overlay-ic").html(html),!0}}function wppaOvlStartAudio(){var a=document.getElementById("wppa-overlay-audio");a&&"function"==typeof a.play&&a.play()}function wppaOvlStartStop(){var a=jQuery;wppaOvlRunning?(wppaOvlRunning=!1,-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&a("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&a("#wppa-ovl-next-btn").css("visibility","visible"),a("#wppa-ovl-stop-btn").hide(),a("#wppa-ovl-start-btn").show())):(wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",50);else{if(!wppaIsVideo){var a=document.getElementById("wppa-overlay-img");if(a&&!wppaIsIe&&!a.complete)return void setTimeout("wppaOvlRun()",50)}var p=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1;wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(p),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaOvlIsSingle||(wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1)),!1}function wppaOvlShowNext(){return wppaOvlIsSingle||(jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1)),!1}function wppaOvlHide(){var a=jQuery;wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),a("#wppa-overlay-ic").html(""),a("#wppa-overlay-bg").fadeOut(300),a(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,wppaOvlMode="",a("#wppa-ovl-spin").hide(),a("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,wppaOvlOpen=!1,document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),a(window).trigger("wppalightboxend"),a(window).trigger("resize")}function wppaOvlOnclick(a){switch(wppaOvlOnclickType){case"none":break;case"close":"normal"==wppaOvlMode&&wppaOvlHide();break;case"browse":var p=a.screenX-window.screenX;48<a.clientY&&(p<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}return!0}function wppaInitOverlay(){var o=jQuery;o(".wp-caption").each(function(){var a=o(this),p=a.find("IMG[alt]").attr("alt")||"",e=a.find(".wp-caption-text").html()||"",t=a.find("a"),l=p+"<br>"+e;t.attr("data-lbtitle")||t.attr("data-lbtitle",l)}),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var a,p,e=o("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=wppaOvlCurIdx=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),p=0;p<e.length;p++)if(a=e[p],o(a).attr("data-rel")?t=o(a).attr("data-rel").split("["):a.rel?t=a.rel.split("["):t[0]="","wppa"==t[0])switch(wppaWppaOverlayActivated=!0,o(a).on("click",function(a){wppaOvlShow(this),a.preventDefault()}),wppaMagnifierCursor){case"pointer":o(a).css("cursor","pointer");break;case"":o(a).css("cursor","default");break;default:o(a).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange),o(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaAdjustControlbar)}function wppaAdjustControlbar(){var a,p=jQuery;wppaOvlOpen&&("normal"!=wppaOvlMode&&(p(".wppa-pctl-div-lb").css({position:"fixed",left:0,right:0,bottom:0,width:screen.width}),p("#wppa-ovl-wrap").css({width:screen.width,height:screen.height})),(a=p(".wppa-pctl-div-lb").width())<12*(parseInt(wppaOvlIconSize)+4)&&(newHeight=parseInt(a/12-4),0<newHeight&&(p(".wppa-pctl-div-lb").find("svg").css({height:newHeight,width:newHeight}),p(".wppa-pctl-div-lb").find("span").css({height:newHeight,width:newHeight}))),p(".wppa-pctl-div-lb").css({visibility:"visible"}))}function wppaOvlResize(){0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",100))}function wppaShowFsButtons(){var a=jQuery;"normal"==wppaOvlMode?(a("#wppa-exit-fulls-btn-2").hide(),a("#wppa-fulls-btn-2").show()):(a("#wppa-exit-fulls-btn-2").show(),a("#wppa-fulls-btn-2").hide()),wppaOvlIsSingle||(wppaOvlRunning?a("#wppa-ovl-stop-btn").show():a("#wppa-ovl-start-btn").show())}function wppaOvlImgClick(a){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(a.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var a="";return wppaOvlIsSingle||(a+='<span id="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:inline-block;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-start-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"none":"inline-block")+';" title="Start" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Play-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-stop-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"inline-block":"none")+';" title="Stop" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Pause-Button",wppaOvlIconSize,!0,!0)+"</span>",a+='<span id="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:inline-block;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>"),a+='<span id="wppa-exit-btn-2" style="margin:0 2px;float:right;display:inline-block;" title="Exit" onclick="wppaOvlHide()" >'+wppaSvgHtml("Exit-2",wppaOvlIconSize,!0,!0)+"</span>",a+='<span id="wppa-fulls-btn-2" style="margin:0 2px;float:right;display:'+("normal"==wppaOvlMode?"inline-block":"none")+';" title="Enter fullscreen" onclick="wppaOvlFull()" >'+wppaSvgHtml("Full-Screen-2",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-exit-fulls-btn-2" style="margin:0 2px;float:right;display:'+("normal"==wppaOvlMode?"none":"inline-block")+';" title="Leave fullscreen" onclick="wppaOvlNorm()" >'+wppaSvgHtml("Exit-Full-Screen-2",wppaOvlIconSize,!0,!0)+"</span>"}jQuery(document).ready(function(a){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()});
js/wppa-popup.js CHANGED
@@ -3,7 +3,7 @@
3
  // Contains popup modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaJsPopupVersion = '7.3.11';
7
 
8
  // Popup of thumbnail images
9
  function wppaPopUp( mocc, elm, id, name, desc, rating, ncom, videohtml, maxsizex, maxsizey ) {
@@ -63,12 +63,9 @@ function wppaPopUp( mocc, elm, id, name, desc, rating, ncom, videohtml, maxsizex
63
  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
64
  topDivSmall = parseInt( elm.offsetTop ) - 7 - 1;
65
 
66
- // Is it mosonry plus?
67
  if ( jQuery( '#grid-item-'+mocc+'-'+id ).length ) {
68
- // var gridMarg = parseInt( jQuery( '#grid-'+mocc ).css( 'marginLeft' ) ) +
69
- // ( wppaThumbnailPitch[mocc] - parseInt( jQuery( '#grid-item-'+mocc+'-'+id ).width() ) );
70
- //wppaConsoleLog('GridMarg='+gridMarg,'force');
71
- leftDivSmall += parseInt( jQuery( '#grid-item-'+mocc+'-'+id ).css( 'left' ) ) + 6;// + gridMarg;
72
  topDivSmall += parseInt( jQuery( '#grid-item-'+mocc+'-'+id ).css( 'top' ) );
73
  }
74
 
@@ -208,6 +205,3 @@ function wppaFullPopUp( mocc, id, url, xwidth, xheight ) {
208
  // Hide rightclick optionally
209
  wppaProtect();
210
  }
211
-
212
- // Say we're in
213
- wppaConsoleLog( 'wppa-popup.js version '+wppaJsPopupVersion+' loaded.', 'force' );
3
  // Contains popup modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsPopupVersion = '7.5.03';
7
 
8
  // Popup of thumbnail images
9
  function wppaPopUp( mocc, elm, id, name, desc, rating, ncom, videohtml, maxsizex, maxsizey ) {
63
  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
64
  topDivSmall = parseInt( elm.offsetTop ) - 7 - 1;
65
 
66
+ // Is it masonry plus?
67
  if ( jQuery( '#grid-item-'+mocc+'-'+id ).length ) {
68
+ leftDivSmall += parseInt( jQuery( '#grid-item-'+mocc+'-'+id ).css( 'left' ) ) + 6;
 
 
 
69
  topDivSmall += parseInt( jQuery( '#grid-item-'+mocc+'-'+id ).css( 'top' ) );
70
  }
71
 
205
  // Hide rightclick optionally
206
  wppaProtect();
207
  }
 
 
 
js/wppa-popup.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsPopupVersion="7.3.11";function wppaPopUp(p,t,e,r,a,i,o,n,d,s){var c,l,u,w,m,g,y,h,x,f,b,v=jQuery("#wppa-thumb-area-"+p).width();if(document.getElementById("x-"+e+"-"+p)){var j=(r?'<div id="wppa-name-'+p+'" style="display:none; padding:1px;" class="wppa_pu_info">'+r+"</div>":"")+(a?'<div id="wppa-desc-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+a+"</div>":"")+(i?'<div id="wppa-rat-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+i+"</div>":"")+(o?'<div id="wppa-ncom-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+o+"</div>":""),k="";switch(wppaThumbTargetBlank&&(k='target="_blank"'),wppaPopupLinkType){case"none":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;case"fullpopup":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" onclick="'+wppaPopupOnclick[e]+'" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;default:t.onclick?(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>"),document.getElementById("wppa-img-"+p).onclick=t.onclick):(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;"><a id="wppa-a" href="'+document.getElementById("x-"+e+"-"+p).href+'" '+k+' style="line-height:1px;" >'+b+"</a>"+j+"</div>"))}}f=document.getElementById("wppa-img-"+p),y=parseInt(d),m=parseInt(s),f&&jQuery(".wppa_pu_info").css("width",(m<y?y:m)-8+"px"),w=parseInt(t.offsetLeft)-7-5-1,l=parseInt(t.offsetTop)-7-1,jQuery("#grid-item-"+p+"-"+e).length&&(w+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("left"))+6,l+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("top"))),h=parseInt(t.clientWidth),g=parseInt(t.clientHeight),x=m<y?y:m,(u=w-parseInt((x-h)/2))<0&&(u=0),v<u+y+16&&(u=v-y-16),(c=l-parseInt((m-g)/2))<0&&(c=0);var I=parseInt((x-y)/2);jQuery("#wppa-img-"+p).css({maxWidth:y+"px"}),jQuery("#wppa-popup-"+p).css({marginLeft:w+"px",marginTop:l+"px"}),jQuery("#wppa-img-"+p).css({marginLeft:0,marginRight:0,width:h+"px",height:g+"px"}),jQuery("#wppa-popup-"+p).stop().animate({marginLeft:u+"px",marginTop:c+"px"},400),jQuery("#wppa-img-"+p).stop().animate({marginLeft:I+"px",marginRight:I+"px",width:y+"px",height:m+"px"},400),setTimeout("wppaPopReady( "+p+" )",400)}function wppaPopReady(p){jQuery("#wppa-name-"+p).show(),jQuery("#wppa-desc-"+p).show(),jQuery("#wppa-rat-"+p).show(),jQuery("#wppa-ncom-"+p).show(),wppaProtect()}function wppaPopDown(p){jQuery("#wppa-popup-"+p).html("")}function wppaFullPopUp(p,t,e,r,a){var i=a+50,o=r+14,n="",d="",s=document.getElementById("i-"+t+"-"+p);s&&(n=s.alt,d=s.title);var c=".pdf"==e.substr(e.length-4,e.length),l=window.open("","Print","width="+o+", height="+i+", location=no, resizable=no, menubar=yes ");if(l.document.write("<html>"),l.document.write("<head>"),l.document.write('<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+"; text-align:center;}</style>"),l.document.write("<title>"+n+"</title>"),l.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>"),l.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>'),l.document.write("</head>"),l.document.write("<body>"),l.document.write('<div style="width:'+r+'px;">'),c?l.document.write('<iframe src="'+e+'" style="padding-bottom:6px;width:100%;height:'+(i-60)+'px;" ></iframe><br />'):l.document.write('<img src="'+e+'" style="padding-bottom:6px;" /><br />'),l.document.write('<div style="text-align:center">'+d+"</div>"),!c){var u=r-66;l.document.write('<img src="'+wppaImageDirectory+'download.png" id="wppa_download" title="Download" style="position:absolute; top:6px; left:'+u+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_downl();" />'),u=r-30,l.document.write('<img src="'+wppaImageDirectory+'printer.png" id="wppa_printer" title="Print" style="position:absolute; top:6px; left:'+u+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_print();" />')}l.document.write("</div>"),l.document.write("</body>"),l.document.write("</html>"),wppaProtect()}wppaConsoleLog("wppa-popup.js version "+wppaJsPopupVersion+" loaded.","force");
1
+ var wppaJsPopupVersion="7.5.03";function wppaPopUp(p,t,e,r,a,i,o,n,d,s){var c,l,u,w,m,g,y,h,x,f,b,v=jQuery("#wppa-thumb-area-"+p).width();if(document.getElementById("x-"+e+"-"+p)){var j=(r?'<div id="wppa-name-'+p+'" style="display:none; padding:1px;" class="wppa_pu_info">'+r+"</div>":"")+(a?'<div id="wppa-desc-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+a+"</div>":"")+(i?'<div id="wppa-rat-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+i+"</div>":"")+(o?'<div id="wppa-ncom-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+o+"</div>":""),k="";switch(wppaThumbTargetBlank&&(k='target="_blank"'),wppaPopupLinkType){case"none":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;case"fullpopup":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" onclick="'+wppaPopupOnclick[e]+'" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;default:t.onclick?(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>"),document.getElementById("wppa-img-"+p).onclick=t.onclick):(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;"><a id="wppa-a" href="'+document.getElementById("x-"+e+"-"+p).href+'" '+k+' style="line-height:1px;" >'+b+"</a>"+j+"</div>"))}}f=document.getElementById("wppa-img-"+p),y=parseInt(d),m=parseInt(s),f&&jQuery(".wppa_pu_info").css("width",(m<y?y:m)-8+"px"),w=parseInt(t.offsetLeft)-7-5-1,l=parseInt(t.offsetTop)-7-1,jQuery("#grid-item-"+p+"-"+e).length&&(w+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("left"))+6,l+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("top"))),h=parseInt(t.clientWidth),g=parseInt(t.clientHeight),x=m<y?y:m,(u=w-parseInt((x-h)/2))<0&&(u=0),v<u+y+16&&(u=v-y-16),(c=l-parseInt((m-g)/2))<0&&(c=0);var I=parseInt((x-y)/2);jQuery("#wppa-img-"+p).css({maxWidth:y+"px"}),jQuery("#wppa-popup-"+p).css({marginLeft:w+"px",marginTop:l+"px"}),jQuery("#wppa-img-"+p).css({marginLeft:0,marginRight:0,width:h+"px",height:g+"px"}),jQuery("#wppa-popup-"+p).stop().animate({marginLeft:u+"px",marginTop:c+"px"},400),jQuery("#wppa-img-"+p).stop().animate({marginLeft:I+"px",marginRight:I+"px",width:y+"px",height:m+"px"},400),setTimeout("wppaPopReady( "+p+" )",400)}function wppaPopReady(p){jQuery("#wppa-name-"+p).show(),jQuery("#wppa-desc-"+p).show(),jQuery("#wppa-rat-"+p).show(),jQuery("#wppa-ncom-"+p).show(),wppaProtect()}function wppaPopDown(p){jQuery("#wppa-popup-"+p).html("")}function wppaFullPopUp(p,t,e,r,a){var i=a+50,o=r+14,n="",d="",s=document.getElementById("i-"+t+"-"+p);s&&(n=s.alt,d=s.title);var c,l=".pdf"==e.substr(e.length-4,e.length),u=window.open("","Print","width="+o+", height="+i+", location=no, resizable=no, menubar=yes ");u.document.write("<html>"),u.document.write("<head>"),u.document.write('<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+"; text-align:center;}</style>"),u.document.write("<title>"+n+"</title>"),u.document.write('<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js" ><\/script><script type="text/javascript">function wppa_downl() {jQuery.ajax( { \turl: \t\t\''+wppaAjaxUrl+"',data: \t\t'action=wppa&wppa-action=makeorigname&photo-id="+t+"&from=popup',async: \ttrue,type: \t\t'GET',timeout: \t10000,beforeSend:\tfunction( xhr ) {},success: \t\tfunction( result, status, xhr ) {result = result.split( \"||\" );if ( result[1] == \"0\" ) {window.open( result[2] );return true;}else {alert( \"Error: \"+result[1]+\" \"+result[2] );return false;}},error: \t\tfunction( xhr, status, error ) {wppaConsoleLog( 'wppaFullPopUp failed. Error = ' + error + ', status = ' + status, 'force' );},} );}<\/script>"),u.document.write('<script type="text/javascript">function wppa_print() {document.getElementById( "wppa_printer" ).style.visibility="hidden"; document.getElementById( "wppa_download" ).style.visibility="hidden"; window.print();}<\/script>'),u.document.write("</head>"),u.document.write("<body>"),u.document.write('<div style="width:'+r+'px;">'),l?u.document.write('<iframe src="'+e+'" style="padding-bottom:6px;width:100%;height:'+(i-60)+'px;" ></iframe><br />'):u.document.write('<img src="'+e+'" style="padding-bottom:6px;" /><br />'),u.document.write('<div style="text-align:center">'+d+"</div>"),l||(c=r-66,u.document.write('<img src="'+wppaImageDirectory+'download.png" id="wppa_download" title="Download" style="position:absolute; top:6px; left:'+c+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_downl();" />'),c=r-30,u.document.write('<img src="'+wppaImageDirectory+'printer.png" id="wppa_printer" title="Print" style="position:absolute; top:6px; left:'+c+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_print();" />')),u.document.write("</div>"),u.document.write("</body>"),u.document.write("</html>"),wppaProtect()}
js/wppa-slideshow.js CHANGED
@@ -3,7 +3,7 @@
3
  // Contains slideshow modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaJsSlideshowVersion = '7.4.03';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
@@ -595,7 +595,6 @@ function _wppaNextSlide_2( mocc ) {
595
  if ( 'IMG' == elm.nodeName ) { // Is an image
596
  if ( ! elm.complete ) { // Is not complete yet
597
  setTimeout( '_wppaNextSlide_2( ' + mocc + ' )', 200 ); // Try again after 100 ms
598
- wppaConsoleLog( 'Retry next2' ); // Log retry
599
  return;
600
  }
601
  }
@@ -876,22 +875,16 @@ function _wppaNextSlide_5( mocc ) {
876
 
877
  // Prepare visual url ( for addressline )
878
  var visurl = _wppaShareUrl[mocc][_wppaCurIdx[mocc]];
879
- // var visurl = wppaGetCurrentFullUrl( mocc, _wppaCurIdx[mocc] );
880
- // if ( '' == visurl ) {
881
- // visurl = _wppaShareUrl[mocc][_wppaCurIdx[mocc]];
882
- // }
883
- //wppaConsoleLog('Visurl='+visurl, 'force');
884
  // Update possible QR Widget
885
  if ( typeof( wppaQRUpdate ) != 'undefined' ) {
886
  wppaQRUpdate( _wppaShareUrl[mocc][_wppaCurIdx[mocc]] );
887
  }
888
 
889
  // Push state if not slphoto
890
- // if ( ! _wppaSSRuns[mocc] ) { // This is not running
891
- if ( _wppaSlides[mocc].length > 1 ) {
892
- wppaPushStateSlide( mocc, _wppaCurIdx[mocc], visurl );
893
- }
894
- // }
895
  }
896
 
897
  // If running: Wait for next slide
@@ -1348,7 +1341,7 @@ function wppaMakeTheSlideHtml( mocc, bgfg, idx ) {
1348
 
1349
  // Adjust the filmstrip
1350
  function _wppaAdjustFilmstrip( mocc, easing ) {
1351
- // wppaConsoleLog('Adjust called with mocc = '+mocc+' init= '+(wppaFilmInit[mocc]?'true':'false'));
1352
  if ( ! document.getElementById( 'wppa-filmstrip-'+mocc ) ) return; // No filmstrip this mocc
1353
 
1354
  var isFilmOnly = ! document.getElementById( 'slide_frame-'+mocc );
@@ -1358,8 +1351,6 @@ function _wppaAdjustFilmstrip( mocc, easing ) {
1358
  jQuery( '.wppa-film-'+mocc ).removeClass( 'wppa-filmthumb-active' );
1359
  }
1360
 
1361
- // wppaConsoleLog( 'Going film to '+_wppaCurIdx[mocc] );
1362
-
1363
  if ( ! _wppaFilmNoMove[mocc] || ! wppaFilmInit[mocc] ) {
1364
 
1365
  var loc = wppaFilmStripLength[mocc] / 2 - ( _wppaCurIdx[mocc] + 0.5 + wppaPreambule[mocc] ) * wppaThumbnailPitch[mocc] - wppaFilmStripMargin[mocc];
@@ -1369,7 +1360,6 @@ function _wppaAdjustFilmstrip( mocc, easing ) {
1369
 
1370
  // If filmstrip not inited, jump to desired location.
1371
  if ( ! wppaFilmInit[mocc] ) {
1372
- // wppaConsoleLog('Film Jump', 'force');
1373
  jQuery( '#wppa-filmstrip-'+mocc ).css( {marginLeft: loc+'px' } );
1374
  setTimeout(function(){wppaFilmInit[mocc] = true;},200);
1375
  }
@@ -1549,14 +1539,13 @@ function _wppaGoto( mocc, idx ) {
1549
  }
1550
 
1551
  function _wppaGotoRunning( mocc, idx ) {
 
1552
  //wait until not bussy
1553
  if ( _wppaIsBusy[mocc] ) {
1554
  setTimeout( '_wppaGotoRunning( '+mocc+',' + idx + ' )', 10 ); // Try again after 10 ms
1555
  return;
1556
  }
1557
 
1558
- wppaConsoleLog( 'GotoRunning '+mocc );
1559
-
1560
  _wppaSSRuns[mocc] = false; // we don't want timed loop to occur during our work
1561
 
1562
  _wppaToTheSame = ( _wppaNxtIdx[mocc] == idx );
@@ -2251,5 +2240,3 @@ function wppaGetSlideshowTimeout( mocc ) {
2251
  }
2252
  return time;
2253
  }
2254
-
2255
- wppaConsoleLog( 'wppa-slideshow.js version '+wppaJsSlideshowVersion+' loaded.', 'force' );
3
  // Contains slideshow modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsSlideshowVersion = '7.5.03';
7
 
8
  // This is an entrypoint to load the slide data
9
  function wppaStoreSlideInfo(
595
  if ( 'IMG' == elm.nodeName ) { // Is an image
596
  if ( ! elm.complete ) { // Is not complete yet
597
  setTimeout( '_wppaNextSlide_2( ' + mocc + ' )', 200 ); // Try again after 100 ms
 
598
  return;
599
  }
600
  }
875
 
876
  // Prepare visual url ( for addressline )
877
  var visurl = _wppaShareUrl[mocc][_wppaCurIdx[mocc]];
878
+
 
 
 
 
879
  // Update possible QR Widget
880
  if ( typeof( wppaQRUpdate ) != 'undefined' ) {
881
  wppaQRUpdate( _wppaShareUrl[mocc][_wppaCurIdx[mocc]] );
882
  }
883
 
884
  // Push state if not slphoto
885
+ if ( _wppaSlides[mocc].length > 1 ) {
886
+ wppaPushStateSlide( mocc, _wppaCurIdx[mocc], visurl );
887
+ }
 
 
888
  }
889
 
890
  // If running: Wait for next slide
1341
 
1342
  // Adjust the filmstrip
1343
  function _wppaAdjustFilmstrip( mocc, easing ) {
1344
+
1345
  if ( ! document.getElementById( 'wppa-filmstrip-'+mocc ) ) return; // No filmstrip this mocc
1346
 
1347
  var isFilmOnly = ! document.getElementById( 'slide_frame-'+mocc );
1351
  jQuery( '.wppa-film-'+mocc ).removeClass( 'wppa-filmthumb-active' );
1352
  }
1353
 
 
 
1354
  if ( ! _wppaFilmNoMove[mocc] || ! wppaFilmInit[mocc] ) {
1355
 
1356
  var loc = wppaFilmStripLength[mocc] / 2 - ( _wppaCurIdx[mocc] + 0.5 + wppaPreambule[mocc] ) * wppaThumbnailPitch[mocc] - wppaFilmStripMargin[mocc];
1360
 
1361
  // If filmstrip not inited, jump to desired location.
1362
  if ( ! wppaFilmInit[mocc] ) {
 
1363
  jQuery( '#wppa-filmstrip-'+mocc ).css( {marginLeft: loc+'px' } );
1364
  setTimeout(function(){wppaFilmInit[mocc] = true;},200);
1365
  }
1539
  }
1540
 
1541
  function _wppaGotoRunning( mocc, idx ) {
1542
+
1543
  //wait until not bussy
1544
  if ( _wppaIsBusy[mocc] ) {
1545
  setTimeout( '_wppaGotoRunning( '+mocc+',' + idx + ' )', 10 ); // Try again after 10 ms
1546
  return;
1547
  }
1548
 
 
 
1549
  _wppaSSRuns[mocc] = false; // we don't want timed loop to occur during our work
1550
 
1551
  _wppaToTheSame = ( _wppaNxtIdx[mocc] == idx );
2240
  }
2241
  return time;
2242
  }
 
 
js/wppa-slideshow.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsSlideshowVersion="7.4.03";function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,l,s,d,u,_,m,c,h,y,S,g,x,f,I,j,Q,b,v,N,T,C,k,R,F){var M,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"==S?_wppaTimeOut[p]="random":0<parseInt(S)?_wppaTimeOut[p]=parseInt(S):_wppaTimeOut[p]=wppaSlideShowTimeOut,_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[p]=[],_wppaRealId[p]=[],_wppaAvg[p]=[],_wppaDisc[p]=[],_wppaMyr[p]=[],_wppaVRU[p]=[],_wppaLinkUrl[p]=[],_wppaLinkTitle[p]=[],_wppaLinkTarget[p]=[],_wppaCommentHtml[p]=[],_wppaIptcHtml[p]=[],_wppaExifHtml[p]=[],_wppaUrl[p]=[],_wppaSkipRated[p]=!1,_wppaLbTitle[p]=[],_wppaDidGoto[p]=!1,wppaSlidePause[p]=!1,_wppaShareUrl[p]=[],_wppaShareHtml[p]=[],_wppaFilmNoMove[p]=!1,_wppaHiresUrl[p]=[],_wppaIsVideo[p]=[],_wppaVideoHtml[p]=[],_wppaAudioHtml[p]=[],_wppaVideoNatWidth[p]=[],_wppaVideoNatHeight[p]=[],wppaVideoPlaying[p]=!1,wppaAudioPlaying[p]=!1,_wppaWaitTexts[p]=[],_wppaImageAlt[p]=[],_wppaFilename[p]=[]),M="default",""!=c?M="pointer":""!=wppaLightBox[p]&&(M="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=N,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+k+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&""==wppaLightBox[p]&&(_wppaSlides[p][a]+=" autoplay "),0<R.length&&(_wppaSlides[p][a]+=' poster="'+R+'" ')):_wppaSlides[p][a]=' src="'+e+'" alt="'+k+'" class="theimg theimg-'+p+' big stereo" ',wppaSlideSwipe&&(_wppaSlides[p][a]+=' ontouchstart="wppaTouchStart( event, this.id, '+p+' );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" '),wppaAutoColumnWidth[p]||(_wppaSlides[p][a]+='width="'+i+'" height="'+w+'" '),_wppaIsVideo[p][a]?(L="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+M+'; display:none;" '+L+">"+N+"</video>"):_wppaSlides[p][a]+='style="'+t+"; cursor:"+M+'; display:none; vertical-align:middle;">',_wppaFullNames[p][a]=wppaRepairBrTags(r),_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=b,_wppaId[p][a]=l,_wppaRealId[p][a]=s,_wppaAvg[p][a]=d,_wppaDisc[p][a]=u,_wppaMyr[p][a]=_,_wppaVRU[p][a]=m,_wppaLinkUrl[p][a]=c,_wppaLinkTitle[p][a]=h,""!=y?_wppaLinkTarget[p][a]=y:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=g,_wppaIptcHtml[p][a]=x,_wppaExifHtml[p][a]=f,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(I),_wppaShareUrl[p][a]=j,_wppaShareHtml[p][a]=wppaRepairScriptTags(Q),_wppaHiresUrl[p][a]=v,_wppaVideoHtml[p][a]=N,_wppaAudioHtml[p][a]=T,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=C,_wppaImageAlt[p][a]=k,_wppaFilename[p][a]=F}function wppaSpeed(p,a){_wppaSSRuns[p]&&_wppaSpeed(p,a)}function wppaStopShow(p){_wppaSSRuns[p]&&_wppaStop(p)}function wppaStartStop(p,a){_wppaIsBusy[p]?_wppaTP[p]=a:(_wppaSSRuns[p]?(_wppaStop(p),jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))):(_wppaStart(p,a),-1==a&&jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Pause-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))),wppaIsMobile&&(jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(10,1).fadeTo(3e3,0),jQuery(".ubb-"+p).stop().fadeTo(10,1).fadeTo(3e3,0)))}function wppaBbb(p,a,e){_wppaSSRuns[p]||_wppaBbb(p,a,e)}function wppaUbb(p,a,e){_wppaUbb(p,a,e)}function wppaRateIt(p,a){_wppaRateIt(p,a)}function wppaOvlRateIt(p,a,e,t){_wppaOvlRateIt(p,a,e,t)}function wppaPrev(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrev(p)}function wppaPrevN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrevN(p,a)}function wppaFirst(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,0)}function wppaNext(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNext(p)}function wppaNextN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNextN(p,a)}function wppaLast(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,_wppaSlides[p].length-1)}function wppaFollowMe(p,a){_wppaSSRuns[p]||_wppaFollowMe(p,a)}function wppaLeaveMe(p,a){_wppaSSRuns[p]||_wppaLeaveMe(p,a)}function wppaGoto(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,a)}function wppaGotoFilmNoMove(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||(_wppaFilmNoMove[p]=!0,_wppaGoto(p,a))}function wppaGotoKeepState(p,a){_wppaNxtIdx[p]!=a&&(_wppaDidGoto[p]=!0,_wppaGotoKeepState(p,a))}function _wppaGotoKeepState(p,a){(_wppaSSRuns[p]?_wppaGotoRunning:_wppaGoto)(p,a)}function wppaGotoRunning(p,a){_wppaDidGoto[p]=!0,_wppaGotoRunning(p,a)}function wppaValidateComment(p){return _wppaValidateComment(p)}function _wppaNextSlide(p,a){if(_wppaStopping[p])_wppaStopping[p]=0;else{if(_wppaLastIdx[p]=_wppaCurIdx[p],!document.getElementById("slide_frame-"+p)&&document.getElementById("filmwindow-"+p)&&wppaFilmonlyContinuous)return _wppaSSRuns[p]?(_wppaCurIdx[p]++,_wppaCurIdx[p]==_wppaSlides[p].length&&(_wppaCurIdx[p]=0),_wppaAdjustFilmstrip(p,"linear"),_wppaNxtIdx[p]=_wppaCurIdx[p],void setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",wppaAnimationSpeed)):(_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFilmInit[p]=!1,void _wppaAdjustFilmstrip(p,"linear"));if(document.getElementById("slide_frame-"+p)||document.getElementById("filmwindow-"+p)){var e,t,i=_wppaFg[p],w=1-i;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"+i+"-"+p).attr("title",wppaSlidePause[p]),jQuery("#slide_frame-"+p).attr("title",wppaSlidePause[p]),void setTimeout("_wppaNextSlide( "+p+', "auto" )',250)}else jQuery("#slide_frame-"+p).removeAttr("title");if((_wppaSSRuns[p]||"auto"!=a)&&_wppaSlides[p]&&(!(_wppaSlides[p].length<2)||_wppaFirst[p])){if(_wppaSSRuns[p]||"reset"!=a||(_wppaSSRuns[p]=!0,__wppaOverruleRun=!1),_wppaVoteInProgress=!1,_wppaIsBusy[p]=!0,_wppaSSRuns[p]&&_wppaShowMetaData(p,"hide"),_wppaSSRuns[p]&&(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0)),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaCurIdx[p]]).css({display:"none"}),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaNxtIdx[p]]).css({display:""}),"undefined"!=typeof _wppaLat&&_wppaLat[p]?(e=_wppaRealId[p],_wppaLat[p][e[_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][e[_wppaNxtIdx[p]]],_wppaLon[p][e[_wppaNxtIdx[p]]])):jQuery("#map-canvas-"+p).css("display","none")):jQuery("#map-canvas-"+p).css("display","none"),jQuery("[id^=wppa-numbar-"+p+"-]").css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar}),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive}),_wppaSlides[p].length>wppaNumbarMax){var r,o,n=_wppaSlides[p].length-1,l=_wppaNxtIdx[p],s=(wppaNumbarMax-1)/2;l<s?(r=0,o=wppaNumbarMax-1-1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):n-s<l?(r=(o=n)-wppaNumbarMax+1+1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(o=l+s+.5-1,(r=l-s+1)<2?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):n-1<o?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})));for(var d=0;d<_wppaSlides[p].length;)0!=d&&d!=n&&(d<r||o<d)?jQuery("#wppa-numbar-"+p+"-"+d).css({display:"none"}):jQuery("#wppa-numbar-"+p+"-"+d).css({display:"block"}),d++}_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?(t=wppaIconSize(p,"1.5em",!1),jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button",t,!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button",t,!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,w,_wppaNxtIdx[p]),_wppaLoadSpinner(p),_wppaFirst[p]=!1,_wppaCheckRewind(p),setTimeout("_wppaNextSlide_2( "+p+" )",10)}}}}}function _wppaNextSlide_2(p){var a=_wppaFg[p],e=1-a,t=document.getElementById("theimg"+e+"-"+p);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=t==i+1?"right":t==i-1?"left":t==i?"none":"nil";switch(t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(s="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(s="right"),"nil"==s&&(s=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:l}),jQuery(r).css({marginLeft:0,width:l}),wppaFormatSlide(p),wppaAnimationType){case"fadeafter":wppaFadeOut(o,wppaAnimationSpeed),setTimeout(wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p)),wppaAnimationSpeed);break;case"swipe":switch(s){case"left":wppaAnimate(w,{marginLeft:-l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:l+"px"}),wppaFadeIn(n,10),wppaAnimate(r,{marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).wppaAnimate({marginLeft:l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-l+"px"}),wppaFadeIn(n,10),jQuery(r).wppaAnimate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":wppaFadeIn(n,10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:wppaFadeOut(o,wppaAnimationSpeed),wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p))}}function _wppaNextSlide_4(p){var a=_wppaFg[p],e="#theslide"+a+"-"+p;jQuery("#theslide"+(1-a)+"-"+p).css({zIndex:80}),jQuery(e).css({zIndex:81}),_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFormatSlide(p),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length):jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length),jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),_wppaAdjustFilmstrip(p),_wppaSetRatingDisplay(p),setTimeout("_wppaNextSlide_5( "+p+" )",_wppaTextDelay)}function _wppaNextSlide_5(p){var a,e,t,i,w,r,o;if(_wppaToTheSame||(a=_wppaDsc[p][_wppaCurIdx[p]],jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty&&(""==(e=_wppaDsc[p][_wppaCurIdx[p]])||"&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]])),_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 n=_wppaTP[p];return _wppaTP[p]=-2,_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p,"next_5"),void wppaStartStop(p,n)}wppaUpdateLightboxes(),wppaIsMini[p]||(t=_wppaShareUrl[p][_wppaCurIdx[p]],"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),1<_wppaSlides[p].length&&wppaPushStateSlide(p,_wppaCurIdx[p],t)),_wppaSSRuns[p]?_wppaCurIdx[p]+1==_wppaSlides[p].length?(i=jQuery("#wppa-next-pagelink-"+p),w=jQuery("#wppa-first-pagelink-"+p),0<i.length&&"hidden"!=jQuery(i).css("visibility")?setTimeout(function(){jQuery("#wppa-next-pagelink-"+p).trigger("click")},wppaGetSlideshowTimeout(p)):0<w.length&&setTimeout(function(){jQuery(w).trigger("click")},wppaGetSlideshowTimeout(p))):setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p)):_wppaStopping[p]=!1,jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),wppaStopAudio(p),!wppaSlideAudioStart||0<(r=jQuery(".wppa-audio-"+_wppaId[p][_wppaCurIdx[p]]+"-"+p)).length&&((o=r[r.length-1])&&(wppaAudioPlaying[p]||o.play())),wppaProtect()}function wppaFormatSlide(p){var a="theimg"+_wppaFg[p]+"-"+p,e=document.getElementById(a);if(e){var t="theslide"+_wppaFg[p]+"-"+p,i="slide_frame-"+p,w=jQuery("#wppa-container-"+p).width();wppaColWidth[p]=w;var r=jQuery(".wppa-audio-"+p),o=e.naturalWidth;void 0===o&&(o=parseInt(e.style.maxWidth));var n=e.naturalHeight;void 0===n&&(n=parseInt(e.style.maxHeight));var l=wppaAspectRatio[p],s=wppaFullSize[p],d=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var c,h,y,S,g,x,f,I,j=wppaStretch;if(u)c=w-d,S=y=0,f=g=w,I=x=(h=parseInt(c*n/o))+d,jQuery("#"+i).css({width:f,height:I}),jQuery("#"+t).css({width:g,height:x}),jQuery("#"+a).css({width:c,height:h});else{if(s<(f=w)&&(f=s),g=f,x=I=parseInt(f*l),j||f-d<=o||I-d<=n?l<(n+d)/(o+d)?(h=I-d,c=parseInt(h*o/n)):(c=f-d,h=parseInt(c*n/o)):(c=o,h=n),"default"!=_&&"none"!=_){switch(_){case"top":S=0;break;case"center":S=parseInt((I-(h+d))/2);break;case"bottom":S=I-(h+d);break;case"fit":S=0,x=I=h+d}jQuery("#"+a).css({marginTop:S,marginBottom:0})}if(jQuery("#"+i).css({width:f,height:I}),jQuery("#"+t).css({width:g,height:x}),jQuery("#"+a).css({width:c,height:h}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":y=0;break;case"center":y=parseInt((w-f)/2);break;case"right":y=w-f}y<0&&(y=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+i).css({marginLeft:y})}var Q=jQuery(r).height(),b=(f-c)/2;Q&&0<Q&&(wppaAudioHeight=Q,jQuery(r).css({height:wppaAudioHeight,width:c,left:b}))}var v=parseInt(f/3),N=2*v,T=0<r.length?I-wppaAudioHeight-wppaSlideBorderWidth-S:I;jQuery("#bbb-"+p+"-l").css({height:T,width:v,left:0}),jQuery("#bbb-"+p+"-r").css({height:T,width:v,left:N})}}function wppaMakeNameHtml(p){var a,e,t="";if(_wppaCurIdx[p]<0)return"";if(wppaIsMini[p]||_wppaIsVideo[p][_wppaCurIdx[p]])t=_wppaFullNames[p][_wppaCurIdx[p]];else switch(wppaArtMonkyLink){case"file":case"zip":t=wppaArtMonkeyButton?_wppaFullNames[p][_wppaCurIdx[p]]?(a=-1!=_wppaFullNames[p][_wppaCurIdx[p]].indexOf("plus.png"),e=_wppaFullNames[p][_wppaCurIdx[p]].replace(/(<([^>]+)>)/gi,""),e=a?e.replace(" )"," +)"):e.replace(" )",")"),'<input type="button" title="Download" style="cursor:pointer;margin-bottom:0px;max-width:'+(wppaGetContainerWidth(p)-24)+'px;" class="wppa-download-button" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+'\' );" value="'+wppaDownLoad+": "+e+'" />'):"":wppaArtmonkeyFileNotSource?'<a href="'+_wppaUrl[p][_wppaCurIdx[p]]+'" title="Download" style="cursor:pointer;" download="'+_wppaFilename[p][_wppaCurIdx[p]]+'" >'+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>":'<a title="Download" style="cursor:pointer;" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+"' );\" >"+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>";break;case"none":case"new":t=_wppaFullNames[p][_wppaCurIdx[p]];break;default:t=""}return wppaRepairBrTags(t)}function wppaMakeTheSlideHtml(p,a,e){var t,i,w=_wppaIsVideo[p][e]?"video":"img",r="title";"wppa"==wppaLightBox[p]&&(r="data-lbtitle");var o,n,l=""==wppaLightBox[p]?' onpause="wppaVideoPlaying['+p+'] = false;" onplay="wppaVideoPlaying['+p+'] = true;"':"";if(""!=_wppaLinkUrl[p][e])t=wppaSlideToFullpopup?'<a onclick="wppaStopAudio();wppaStopShow('+p+");"+_wppaLinkUrl[p][e]+'" target="'+_wppaLinkTarget[p][e]+'" title="'+_wppaLinkTitle[p][e]+'"><'+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>":"<a onclick=\"_bumpClickCount('"+_wppaId[p][e]+"');wppaStopAudio();wppaStopShow("+p+");window.open('"+_wppaLinkUrl[p][e]+"', '"+_wppaLinkTarget[p][e]+'\');" title="'+_wppaLinkTitle[p][e]+'"><'+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+w+l+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var s="",d=0,u=wppaLightboxSingle[p]?"":"[slide-"+p+"-"+a+"]";d<e;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),s+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;for(i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][e]:wppaMakeFullsizeUrl(_wppaUrl[p][e]),n=".pdf"==(o=_wppaHiresUrl[p][e]).substr(o.length-4,o.length),s+='<a href="'+i+'" onclick="wppaStopAudio();wppaStopShow('+p+');" style="cursor:pointer;" target="'+_wppaLinkTarget[p][e]+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][e]+'" data-videonatheight="'+_wppaVideoNatHeight[p][e]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][e])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][e])+'"':"")+" "+r+'="'+_wppaLbTitle[p][e]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'">'+(n?"<iframe "+l+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e])+"</a>",d=e+1;d<_wppaUrl[p].length;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),s+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;t=s}""!=_wppaAudioHtml[p][e]&&(t+='<audio controls id="wppa-audio-'+_wppaId[p][e]+"-"+p+'" class="wppa-audio-'+p+" wppa-audio-"+_wppaId[p][e]+"-"+p+'" data-from="wppa" onplay="wppaAudioPlaying['+p+'] = true;" onpause="wppaAudioPlaying['+p+'] = false" style="position:relative;top:-'+(wppaAudioHeight+wppaSlideBorderWidth)+"px;z-index:10;width:"+_wppaVideoNatWidth[p][e]+'px;padding:0;box-sizing:border-box;" >'+_wppaAudioHtml[p][e]+"</audio>"),t=t.replace(/title=""/g,""),jQuery("#theslide"+a+"-"+p).html(t)}function _wppaAdjustFilmstrip(p,a){if(document.getElementById("wppa-filmstrip-"+p)){var e,t,i,w=!document.getElementById("slide_frame-"+p);if(w||jQuery(".wppa-film-"+p).removeClass("wppa-filmthumb-active"),_wppaFilmNoMove[p]&&wppaFilmInit[p]?_wppaFilmNoMove[p]=!1:(e=wppaFilmStripLength[p]/2-(_wppaCurIdx[p]+.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmShowGlue&&(e-=2*wppaFilmStripMargin[p]+2),t=wppaFilmStripLength[p]/2-(.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],i=wppaFilmStripLength[p]/2-(-.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmInit[p]?0==_wppaCurIdx[p]&&_wppaSSRuns[p]&&_wppaLastIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+"px"}),wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:t+"px"},wppaAnimationSpeed,a)):wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},wppaAnimationSpeed,a):(jQuery("#wppa-filmstrip-"+p).css({marginLeft:e+"px"}),setTimeout(function(){wppaFilmInit[p]=!0},200)),_wppaLastIdx[p]=_wppaCurIdx[p]),wppaMakeLazyVisible(p,!0),!w&&-1!=_wppaCurIdx[p]){_wppaCurIdx[p]-10<0&&0,_wppaCurIdx[p]+10>_wppaSlides[p].length&&_wppaSlides[p].length;for(var r=0;r<_wppaSlides[p].length;){jQuery("#film_wppatnf_"+_wppaId[p][r]+"_"+p).html()&&(""!=jQuery("#wppa-film-"+r+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+r+"-"+p).attr("title",jQuery("#wppa-film-"+r+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+r+"-"+p).attr("title",jQuery("#wppa-film-"+r+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==r?(jQuery("#wppa-film-"+r+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+r+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+r+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][r]),jQuery("#wppa-pre-"+r+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][r]))),r++}}w||jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).addClass("wppa-filmthumb-active")}}function _wppaNext(p){if(wppaSlideWrap[p]||_wppaCurIdx[p]!=_wppaSlides[p].length-1)if(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length){var a=jQuery("#wppa-next-pagelink-"+p),e=jQuery("#wppa-first-pagelink-"+p);if(0<a.length&&"hidden"!=jQuery(a).css("visibility"))return void jQuery("#wppa-next-pagelink-"+p).trigger("click");if(0<e.length)return void jQuery(e).trigger("click")}else _wppaNextSlide(p,0)}function _wppaNextN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]>=_wppaSlides[p].length-a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]+a;_wppaNxtIdx[p]>=_wppaSlides[p].length;)_wppaNxtIdx[p]-=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaNextOnCallback(p){if(wppaSlideWrap[p]||_wppaCurIdx[p]!=_wppaSlides[p].length-1){if(_wppaSkipRated[p]){var a=_wppaCurIdx[p]+1;a==_wppaSlides[p].length&&(a=0);var e=a;if(0!=_wppaMyr[p][e]){for(++a==_wppaSlides[p].length&&(a=0);a!=e&&0!=_wppaMyr[p][a];)++a==_wppaSlides[p].length&&(a=0);e=a}_wppaNxtIdx[p]=e}else _wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0);_wppaNextSlide(p,0)}}function _wppaPrev(p){!wppaSlideWrap[p]&&0==_wppaCurIdx[p]||(_wppaNxtIdx[p]=_wppaCurIdx[p]-1,_wppaNxtIdx[p]<0?jQuery("#wppa-prev-page-last-item-"+p).trigger("click"):_wppaNextSlide(p,0))}function _wppaPrevN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]<a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]-a;_wppaNxtIdx[p]<0;)_wppaNxtIdx[p]+=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaGoto(p,a){_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,_wppaNextSlide(p,0)}function _wppaGotoRunning(p,a){_wppaIsBusy[p]?setTimeout("_wppaGotoRunning( "+p+","+a+" )",10):(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){if(_wppaStopping[p])return _wppaStopping[p]--,void setTimeout(function(){_wppaStart(p,a)},(wppaAnimationSpeed+wppaGetSlideshowTimeout(p))/10);_wppaSSRuns[p]||("icons"==wppaSlideshowNavigationType?_wppaStartIcons:_wppaStartText)(p,a)}function _wppaStartIcons(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}var t=wppaIconSize(p,"1.5em",!1);-1<a?(jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaSvgHtml("Pause-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).show(),jQuery("#speed1-"+p).show(),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStartText(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}-1<a?(jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaStop),jQuery("#speed0-"+p).css("display","inline"),jQuery("#speed1-"+p).css("display","inline"),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStop(p){_wppaStopping[p]=12,("icons"==wppaSlideshowNavigationType?_wppaStopIcons:_wppaStopText)(p)}function _wppaStopIcons(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"1.5em",!1),!1,!0)),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaStopText(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaSpeed(p,a){"random"!=_wppaTimeOut[p]&&(a?500<_wppaTimeOut[p]&&(_wppaTimeOut[p]/=1.5):_wppaTimeOut[p]<6e4&&(_wppaTimeOut[p]*=1.5))}function _wppaLoadSpinner(p){}function _wppaUnloadSpinner(p){jQuery("#wppa-slide-spin-"+p).stop().fadeOut(),setTimeout(function(){jQuery("#wppa-slide-spin-"+p).stop().fadeOut()},1e3)}function _wppaCheckRewind(p){var a,e,t;document.getElementById("wppa-filmstrip-"+p)&&((t=Math.abs(_wppaCurIdx[p]-_wppaNxtIdx[p]))<=wppaFilmPageSize[p]||(1+wppaFilmStripLength[p]/wppaThumbnailPitch[p])/2<=t&&(a=wppaThumbnailPitch[p]*_wppaSlides[p].length,wppaFilmShowGlue&&(a+=2+2*wppaFilmStripMargin[p]),e=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),_wppaNxtIdx[p]>_wppaCurIdx[p]?e-=a:e+=a,jQuery("#wppa-filmstrip-"+p).css("margin-left",e+"px")))}function _wppaSetRatingDisplay(p){if(document.getElementById("wppa-rating-"+p)){var a,e,t,w,r=_wppaAvg[p][_wppaCurIdx[p]];if(void 0!==r){if("likes"==wppaRatingDisplayType){"void"==(w=_wppaMyr[p][_wppaCurIdx[p]])?(jQuery("#wppa-dislike-imgdiv-"+p).hide(),jQuery("#wppa-like-imgdiv-"+p).hide()):(jQuery("#wppa-dislike-imgdiv-"+p).show(),jQuery("#wppa-like-imgdiv-"+p).show());var o=r.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(r=(a=r.split("|"))[0],e=a[1],t=_wppaDisc[p][_wppaCurIdx[p]],w=_wppaMyr[p][_wppaCurIdx[p]],"graphic"==wppaRatingDisplayType)_wppaSetRd(p,r,"#wppa-avg-"),_wppaSetRd(p,w,"#wppa-rate-"),0==w?(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",t));else{if(jQuery("#wppa-numrate-avg-"+p).html(r+" ( "+e+" ) "),jQuery(".wppa-my-rat-"+p).show(),"void"==w)jQuery("#wppa-numrate-mine-"+p).html(""),jQuery(".wppa-my-rat-"+p).hide();else if(wppaRatingOnce&&0<w)jQuery("#wppa-numrate-mine-"+p).html(w);else if(w<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var n="";for(i=1;i<=wppaRatingMax;i++)w==i?n+='<span style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )">&nbsp;'+i+"&nbsp;</span>":(w>i-1&&w<i&&(n+="&nbsp;( "+w+" )&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==w?(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(t+"&bull; "),jQuery("#wppa-filler-"+p).css("display","none")}0==w?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(e)}}}function wppaGetDislikeText(p,a,e){return p}function _wppaSetRd(p,a,e){var t=parseInt(a),i=t+1,w=wppaStarOpacity+(a-t)*(1-wppaStarOpacity),r=wppaRatingMax;if("void"==a)jQuery("#wppa-my-rat-"+p).hide(),jQuery(".wppa-my-rat-"+p).hide(),jQuery(".wppa-rate-"+p).hide(),jQuery(".wppa-ratingthumb").hide(),jQuery("#wppa-numrate-mine-"+p).hide();else for(jQuery("#wppa-my-rat-"+p).show(),jQuery(".wppa-my-rat-"+p).show(),jQuery(".wppa-rate-"+p).show(),jQuery(".wppa-ratingthumb").show(),jQuery("#wppa-numrate-mine-"+p).show(),idx=1;idx<=r;idx++)"#wppa-rate-"!=e&&".wppa-rate-"!=e||jQuery(e+p+"-"+idx).attr("src")!=wppaImageDirectory+"star.ico"&&jQuery(e+p+"-"+idx).attr("src",wppaImageDirectory+"star.ico"),idx<=t?jQuery(e+p+"-"+idx).stop().fadeTo(100,1):idx==i?jQuery(e+p+"-"+idx).stop().fadeTo(100,w):jQuery(e+p+"-"+idx).stop().fadeTo(100,wppaStarOpacity)}function _wppaFollowMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,a,"#wppa-rate-")}function wppaOvlFollowMe(p,a,e){e||_wppaSetRd(p,a,".wppa-rate-")}function _wppaLeaveMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,_wppaMyr[p][_wppaCurIdx[p]],"#wppa-rate-")}function wppaOvlLeaveMe(p,a,e){_wppaSetRd(p,e,".wppa-rate-")}function _wppaValidateComment(p,a){if(a=a||_wppaId[p][_wppaCurIdx[p]],jQuery("#wppa-comname-"+p).val().length<1)return alert(wppaPleaseName),!1;if("required"==wppaEmailRequired||"optional"==wppaEmailRequired){var e=jQuery("#wppa-comemail-"+p).val();if("optional"==wppaEmailRequired&&0==e.length)return!0;var t=e.indexOf("@"),i=e.lastIndexOf(".");if(t<1||i<t+2||i+2>=e.length)return alert(wppaPleaseEmail),!1}return!(jQuery("#wppa-comment-"+p).val().length<1)||(alert(wppaPleaseComment),!1)}function _wppaGo(p){document.location=p}function _wppaBbb(p,a,e){if(!_wppaSSRuns[p]){var t="#bbb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".bbb-"+p).css("cursor","pointer");break;case"hide":jQuery(".bbb-"+p).removeAttr("title"),jQuery(".bbb-"+p).css("cursor","default");break;case"click":"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}}function _wppaUbb(p,a,e){var t="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".ubb-"+p).css("cursor","pointer"),jQuery(".ubb-"+p).stop().fadeTo(200,.8),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,.8);break;case"hide":jQuery(".ubb-"+p).removeAttr("title"),jQuery(".ubb-"+p).css("cursor","default"),jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);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,e;return"random"==_wppaTimeOut[p]?(a=2*wppaAnimationSpeed,e=7*wppaAnimationSpeed,Math.floor(Math.random()*(e-a+1))+a):_wppaTimeOut[p]}wppaConsoleLog("wppa-slideshow.js version "+wppaJsSlideshowVersion+" loaded.","force");
1
+ var wppaJsSlideshowVersion="7.5.03";function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,n,l,s,d,u,_,m,c,h,y,S,g,x,f,I,j,Q,b,v,N,T,C,k,R,F){var M,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"==S?_wppaTimeOut[p]="random":0<parseInt(S)?_wppaTimeOut[p]=parseInt(S):_wppaTimeOut[p]=wppaSlideShowTimeOut,_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[p]=[],_wppaRealId[p]=[],_wppaAvg[p]=[],_wppaDisc[p]=[],_wppaMyr[p]=[],_wppaVRU[p]=[],_wppaLinkUrl[p]=[],_wppaLinkTitle[p]=[],_wppaLinkTarget[p]=[],_wppaCommentHtml[p]=[],_wppaIptcHtml[p]=[],_wppaExifHtml[p]=[],_wppaUrl[p]=[],_wppaSkipRated[p]=!1,_wppaLbTitle[p]=[],_wppaDidGoto[p]=!1,wppaSlidePause[p]=!1,_wppaShareUrl[p]=[],_wppaShareHtml[p]=[],_wppaFilmNoMove[p]=!1,_wppaHiresUrl[p]=[],_wppaIsVideo[p]=[],_wppaVideoHtml[p]=[],_wppaAudioHtml[p]=[],_wppaVideoNatWidth[p]=[],_wppaVideoNatHeight[p]=[],wppaVideoPlaying[p]=!1,wppaAudioPlaying[p]=!1,_wppaWaitTexts[p]=[],_wppaImageAlt[p]=[],_wppaFilename[p]=[]),M="default",""!=c?M="pointer":""!=wppaLightBox[p]&&(M="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=N,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+k+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&""==wppaLightBox[p]&&(_wppaSlides[p][a]+=" autoplay "),0<R.length&&(_wppaSlides[p][a]+=' poster="'+R+'" ')):_wppaSlides[p][a]=' src="'+e+'" alt="'+k+'" class="theimg theimg-'+p+' big stereo" ',wppaSlideSwipe&&(_wppaSlides[p][a]+=' ontouchstart="wppaTouchStart( event, this.id, '+p+' );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" '),wppaAutoColumnWidth[p]||(_wppaSlides[p][a]+='width="'+i+'" height="'+w+'" '),_wppaIsVideo[p][a]?(L="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+M+'; display:none;" '+L+">"+N+"</video>"):_wppaSlides[p][a]+='style="'+t+"; cursor:"+M+'; display:none; vertical-align:middle;">',_wppaFullNames[p][a]=wppaRepairBrTags(r),_wppaNames[p][a]=o,_wppaDsc[p][a]=n,_wppaOgDsc[p][a]=b,_wppaId[p][a]=l,_wppaRealId[p][a]=s,_wppaAvg[p][a]=d,_wppaDisc[p][a]=u,_wppaMyr[p][a]=_,_wppaVRU[p][a]=m,_wppaLinkUrl[p][a]=c,_wppaLinkTitle[p][a]=h,""!=y?_wppaLinkTarget[p][a]=y:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=g,_wppaIptcHtml[p][a]=x,_wppaExifHtml[p][a]=f,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(I),_wppaShareUrl[p][a]=j,_wppaShareHtml[p][a]=wppaRepairScriptTags(Q),_wppaHiresUrl[p][a]=v,_wppaVideoHtml[p][a]=N,_wppaAudioHtml[p][a]=T,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=C,_wppaImageAlt[p][a]=k,_wppaFilename[p][a]=F}function wppaSpeed(p,a){_wppaSSRuns[p]&&_wppaSpeed(p,a)}function wppaStopShow(p){_wppaSSRuns[p]&&_wppaStop(p)}function wppaStartStop(p,a){_wppaIsBusy[p]?_wppaTP[p]=a:(_wppaSSRuns[p]?(_wppaStop(p),jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))):(_wppaStart(p,a),-1==a&&jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Pause-Button",wppaIconSize(p,"48px",!0),!1,!0,"0","10","50","50"))),wppaIsMobile&&(jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(10,1).fadeTo(3e3,0),jQuery(".ubb-"+p).stop().fadeTo(10,1).fadeTo(3e3,0)))}function wppaBbb(p,a,e){_wppaSSRuns[p]||_wppaBbb(p,a,e)}function wppaUbb(p,a,e){_wppaUbb(p,a,e)}function wppaRateIt(p,a){_wppaRateIt(p,a)}function wppaOvlRateIt(p,a,e,t){_wppaOvlRateIt(p,a,e,t)}function wppaPrev(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrev(p)}function wppaPrevN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrevN(p,a)}function wppaFirst(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,0)}function wppaNext(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNext(p)}function wppaNextN(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNextN(p,a)}function wppaLast(p){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,_wppaSlides[p].length-1)}function wppaFollowMe(p,a){_wppaSSRuns[p]||_wppaFollowMe(p,a)}function wppaLeaveMe(p,a){_wppaSSRuns[p]||_wppaLeaveMe(p,a)}function wppaGoto(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,a)}function wppaGotoFilmNoMove(p,a){_wppaDidGoto[p]=!0,_wppaSSRuns[p]||(_wppaFilmNoMove[p]=!0,_wppaGoto(p,a))}function wppaGotoKeepState(p,a){_wppaNxtIdx[p]!=a&&(_wppaDidGoto[p]=!0,_wppaGotoKeepState(p,a))}function _wppaGotoKeepState(p,a){(_wppaSSRuns[p]?_wppaGotoRunning:_wppaGoto)(p,a)}function wppaGotoRunning(p,a){_wppaDidGoto[p]=!0,_wppaGotoRunning(p,a)}function wppaValidateComment(p){return _wppaValidateComment(p)}function _wppaNextSlide(p,a){if(_wppaStopping[p])_wppaStopping[p]=0;else{if(_wppaLastIdx[p]=_wppaCurIdx[p],!document.getElementById("slide_frame-"+p)&&document.getElementById("filmwindow-"+p)&&wppaFilmonlyContinuous)return _wppaSSRuns[p]?(_wppaCurIdx[p]++,_wppaCurIdx[p]==_wppaSlides[p].length&&(_wppaCurIdx[p]=0),_wppaAdjustFilmstrip(p,"linear"),_wppaNxtIdx[p]=_wppaCurIdx[p],void setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",wppaAnimationSpeed)):(_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFilmInit[p]=!1,void _wppaAdjustFilmstrip(p,"linear"));if(document.getElementById("slide_frame-"+p)||document.getElementById("filmwindow-"+p)){var e,t,i=_wppaFg[p],w=1-i;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"+i+"-"+p).attr("title",wppaSlidePause[p]),jQuery("#slide_frame-"+p).attr("title",wppaSlidePause[p]),void setTimeout("_wppaNextSlide( "+p+', "auto" )',250)}else jQuery("#slide_frame-"+p).removeAttr("title");if((_wppaSSRuns[p]||"auto"!=a)&&_wppaSlides[p]&&(!(_wppaSlides[p].length<2)||_wppaFirst[p])){if(_wppaSSRuns[p]||"reset"!=a||(_wppaSSRuns[p]=!0,__wppaOverruleRun=!1),_wppaVoteInProgress=!1,_wppaIsBusy[p]=!0,_wppaSSRuns[p]&&_wppaShowMetaData(p,"hide"),_wppaSSRuns[p]&&(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0)),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaCurIdx[p]]).css({display:"none"}),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaNxtIdx[p]]).css({display:""}),"undefined"!=typeof _wppaLat&&_wppaLat[p]?(e=_wppaRealId[p],_wppaLat[p][e[_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][e[_wppaNxtIdx[p]]],_wppaLon[p][e[_wppaNxtIdx[p]]])):jQuery("#map-canvas-"+p).css("display","none")):jQuery("#map-canvas-"+p).css("display","none"),jQuery("[id^=wppa-numbar-"+p+"-]").css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar}),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive}),_wppaSlides[p].length>wppaNumbarMax){var r,o,n=_wppaSlides[p].length-1,l=_wppaNxtIdx[p],s=(wppaNumbarMax-1)/2;l<s?(r=0,o=wppaNumbarMax-1-1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):n-s<l?(r=(o=n)-wppaNumbarMax+1+1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(o=l+s+.5-1,(r=l-s+1)<2?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):n-1<o?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})));for(var d=0;d<_wppaSlides[p].length;)0!=d&&d!=n&&(d<r||o<d)?jQuery("#wppa-numbar-"+p+"-"+d).css({display:"none"}):jQuery("#wppa-numbar-"+p+"-"+d).css({display:"block"}),d++}_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?(t=wppaIconSize(p,"1.5em",!1),jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button",t,!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button",t,!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,w,_wppaNxtIdx[p]),_wppaLoadSpinner(p),_wppaFirst[p]=!1,_wppaCheckRewind(p),setTimeout("_wppaNextSlide_2( "+p+" )",10)}}}}}function _wppaNextSlide_2(p){var a=_wppaFg[p],e=1-a,t=document.getElementById("theimg"+e+"-"+p);!t||1!=t.nodeType||"IMG"!=t.nodeName||t.complete?(wppaUpdateLightboxes(),_wppaUnloadSpinner(p),-1!=_wppaSSRuns[p]&&(_wppaToTheSame||_wppaShowMetaData(p,"hide")),_wppaFg[p]=1-_wppaFg[p],e=1-(a=_wppaFg[p]),setTimeout("_wppaNextSlide_3( "+p+" )",10)):setTimeout("_wppaNextSlide_2( "+p+" )",200)}function _wppaNextSlide_3(p){var a=_wppaFg[p],e=1-a,t=_wppaCurIdx[p],i=_wppaNxtIdx[p],w="#theslide"+e+"-"+p,r="#theslide"+a+"-"+p,o="#theimg"+e+"-"+p,n="#theimg"+a+"-"+p,l=parseInt(jQuery(w).css("width")),s=t==i+1?"right":t==i-1?"left":t==i?"none":"nil";switch(t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(s="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(s="right"),"nil"==s&&(s=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:l}),jQuery(r).css({marginLeft:0,width:l}),wppaFormatSlide(p),wppaAnimationType){case"fadeafter":wppaFadeOut(o,wppaAnimationSpeed),setTimeout(wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p)),wppaAnimationSpeed);break;case"swipe":switch(s){case"left":wppaAnimate(w,{marginLeft:-l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:l+"px"}),wppaFadeIn(n,10),wppaAnimate(r,{marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"right":jQuery(w).wppaAnimate({marginLeft:l+"px"},wppaAnimationSpeed,"swing"),jQuery(r).css({marginLeft:-l+"px"}),wppaFadeIn(n,10),jQuery(r).wppaAnimate({marginLeft:"0px"},wppaAnimationSpeed,"swing",_wppaNextSlide_4(p));break;case"none":wppaFadeIn(n,10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:wppaFadeOut(o,wppaAnimationSpeed),wppaFadeIn(n,wppaAnimationSpeed,_wppaNextSlide_4(p))}}function _wppaNextSlide_4(p){var a=_wppaFg[p],e="#theslide"+a+"-"+p;jQuery("#theslide"+(1-a)+"-"+p).css({zIndex:80}),jQuery(e).css({zIndex:81}),_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFormatSlide(p),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length):jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length),jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),_wppaAdjustFilmstrip(p),_wppaSetRatingDisplay(p),setTimeout("_wppaNextSlide_5( "+p+" )",_wppaTextDelay)}function _wppaNextSlide_5(p){var a,e,t,i,w,r,o;if(_wppaToTheSame||(a=_wppaDsc[p][_wppaCurIdx[p]],jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty&&(""==(e=_wppaDsc[p][_wppaCurIdx[p]])||"&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]])),_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 n=_wppaTP[p];return _wppaTP[p]=-2,_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p,"next_5"),void wppaStartStop(p,n)}wppaUpdateLightboxes(),wppaIsMini[p]||(t=_wppaShareUrl[p][_wppaCurIdx[p]],"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),1<_wppaSlides[p].length&&wppaPushStateSlide(p,_wppaCurIdx[p],t)),_wppaSSRuns[p]?_wppaCurIdx[p]+1==_wppaSlides[p].length?(i=jQuery("#wppa-next-pagelink-"+p),w=jQuery("#wppa-first-pagelink-"+p),0<i.length&&"hidden"!=jQuery(i).css("visibility")?setTimeout(function(){jQuery("#wppa-next-pagelink-"+p).trigger("click")},wppaGetSlideshowTimeout(p)):0<w.length&&setTimeout(function(){jQuery(w).trigger("click")},wppaGetSlideshowTimeout(p))):setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p)):_wppaStopping[p]=!1,jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),wppaStopAudio(p),!wppaSlideAudioStart||0<(r=jQuery(".wppa-audio-"+_wppaId[p][_wppaCurIdx[p]]+"-"+p)).length&&((o=r[r.length-1])&&(wppaAudioPlaying[p]||o.play())),wppaProtect()}function wppaFormatSlide(p){var a="theimg"+_wppaFg[p]+"-"+p,e=document.getElementById(a);if(e){var t="theslide"+_wppaFg[p]+"-"+p,i="slide_frame-"+p,w=jQuery("#wppa-container-"+p).width();wppaColWidth[p]=w;var r=jQuery(".wppa-audio-"+p),o=e.naturalWidth;void 0===o&&(o=parseInt(e.style.maxWidth));var n=e.naturalHeight;void 0===n&&(n=parseInt(e.style.maxHeight));var l=wppaAspectRatio[p],s=wppaFullSize[p],d=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var c,h,y,S,g,x,f,I,j=wppaStretch;if(u)c=w-d,S=y=0,f=g=w,I=x=(h=parseInt(c*n/o))+d,jQuery("#"+i).css({width:f,height:I}),jQuery("#"+t).css({width:g,height:x}),jQuery("#"+a).css({width:c,height:h});else{if(s<(f=w)&&(f=s),g=f,x=I=parseInt(f*l),j||f-d<=o||I-d<=n?l<(n+d)/(o+d)?(h=I-d,c=parseInt(h*o/n)):(c=f-d,h=parseInt(c*n/o)):(c=o,h=n),"default"!=_&&"none"!=_){switch(_){case"top":S=0;break;case"center":S=parseInt((I-(h+d))/2);break;case"bottom":S=I-(h+d);break;case"fit":S=0,x=I=h+d}jQuery("#"+a).css({marginTop:S,marginBottom:0})}if(jQuery("#"+i).css({width:f,height:I}),jQuery("#"+t).css({width:g,height:x}),jQuery("#"+a).css({width:c,height:h}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m){switch(m){case"left":y=0;break;case"center":y=parseInt((w-f)/2);break;case"right":y=w-f}y<0&&(y=0),jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"}),jQuery("#"+i).css({marginLeft:y})}var Q=jQuery(r).height(),b=(f-c)/2;Q&&0<Q&&(wppaAudioHeight=Q,jQuery(r).css({height:wppaAudioHeight,width:c,left:b}))}var v=parseInt(f/3),N=2*v,T=0<r.length?I-wppaAudioHeight-wppaSlideBorderWidth-S:I;jQuery("#bbb-"+p+"-l").css({height:T,width:v,left:0}),jQuery("#bbb-"+p+"-r").css({height:T,width:v,left:N})}}function wppaMakeNameHtml(p){var a,e,t="";if(_wppaCurIdx[p]<0)return"";if(wppaIsMini[p]||_wppaIsVideo[p][_wppaCurIdx[p]])t=_wppaFullNames[p][_wppaCurIdx[p]];else switch(wppaArtMonkyLink){case"file":case"zip":t=wppaArtMonkeyButton?_wppaFullNames[p][_wppaCurIdx[p]]?(a=-1!=_wppaFullNames[p][_wppaCurIdx[p]].indexOf("plus.png"),e=_wppaFullNames[p][_wppaCurIdx[p]].replace(/(<([^>]+)>)/gi,""),e=a?e.replace(" )"," +)"):e.replace(" )",")"),'<input type="button" title="Download" style="cursor:pointer;margin-bottom:0px;max-width:'+(wppaGetContainerWidth(p)-24)+'px;" class="wppa-download-button" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+'\' );" value="'+wppaDownLoad+": "+e+'" />'):"":wppaArtmonkeyFileNotSource?'<a href="'+_wppaUrl[p][_wppaCurIdx[p]]+'" title="Download" style="cursor:pointer;" download="'+_wppaFilename[p][_wppaCurIdx[p]]+'" >'+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>":'<a title="Download" style="cursor:pointer;" onclick="'+(wppaIsSafari&&"file"==wppaArtMonkyLink?"wppaWindowReference = window.open();":"")+"wppaAjaxMakeOrigName( "+p+", '"+_wppaId[p][_wppaCurIdx[p]]+"' );\" >"+wppaDownLoad+": "+_wppaFullNames[p][_wppaCurIdx[p]]+"</a>";break;case"none":case"new":t=_wppaFullNames[p][_wppaCurIdx[p]];break;default:t=""}return wppaRepairBrTags(t)}function wppaMakeTheSlideHtml(p,a,e){var t,i,w=_wppaIsVideo[p][e]?"video":"img",r="title";"wppa"==wppaLightBox[p]&&(r="data-lbtitle");var o,n,l=""==wppaLightBox[p]?' onpause="wppaVideoPlaying['+p+'] = false;" onplay="wppaVideoPlaying['+p+'] = true;"':"";if(""!=_wppaLinkUrl[p][e])t=wppaSlideToFullpopup?'<a onclick="wppaStopAudio();wppaStopShow('+p+");"+_wppaLinkUrl[p][e]+'" target="'+_wppaLinkTarget[p][e]+'" title="'+_wppaLinkTitle[p][e]+'"><'+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>":"<a onclick=\"_bumpClickCount('"+_wppaId[p][e]+"');wppaStopAudio();wppaStopShow("+p+");window.open('"+_wppaLinkUrl[p][e]+"', '"+_wppaLinkTarget[p][e]+'\');" title="'+_wppaLinkTitle[p][e]+'"><'+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e]+"</a>";else if(""==wppaLightBox[p])t="<"+w+l+' title="'+_wppaNames[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var s="",d=0,u=wppaLightboxSingle[p]?"":"[slide-"+p+"-"+a+"]";d<e;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),s+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;for(i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][e]:wppaMakeFullsizeUrl(_wppaUrl[p][e]),n=".pdf"==(o=_wppaHiresUrl[p][e]).substr(o.length-4,o.length),s+='<a href="'+i+'" onclick="wppaStopAudio();wppaStopShow('+p+');" style="cursor:pointer;" target="'+_wppaLinkTarget[p][e]+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][e]+'" data-videonatheight="'+_wppaVideoNatHeight[p][e]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][e])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][e])+'"':"")+" "+r+'="'+_wppaLbTitle[p][e]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'">'+(n?"<iframe "+l+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+l+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e])+"</a>",d=e+1;d<_wppaUrl[p].length;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][d]:wppaMakeFullsizeUrl(_wppaUrl[p][d]),n=".pdf"==(o=_wppaHiresUrl[p][d]).substr(o.length-4,o.length),s+='<a href="'+i+'"'+(_wppaIsVideo[p][d]?' data-videonatwidth="'+_wppaVideoNatWidth[p][d]+'" data-videonatheight="'+_wppaVideoNatHeight[p][d]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][d])+'"':"")+(n?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][d]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][d])+'"':"")+" "+r+'="'+_wppaLbTitle[p][d]+'" '+wppaRel+'="'+wppaLightBox[p]+u+'"></a>',d++;t=s}""!=_wppaAudioHtml[p][e]&&(t+='<audio controls id="wppa-audio-'+_wppaId[p][e]+"-"+p+'" class="wppa-audio-'+p+" wppa-audio-"+_wppaId[p][e]+"-"+p+'" data-from="wppa" onplay="wppaAudioPlaying['+p+'] = true;" onpause="wppaAudioPlaying['+p+'] = false" style="position:relative;top:-'+(wppaAudioHeight+wppaSlideBorderWidth)+"px;z-index:10;width:"+_wppaVideoNatWidth[p][e]+'px;padding:0;box-sizing:border-box;" >'+_wppaAudioHtml[p][e]+"</audio>"),t=t.replace(/title=""/g,""),jQuery("#theslide"+a+"-"+p).html(t)}function _wppaAdjustFilmstrip(p,a){if(document.getElementById("wppa-filmstrip-"+p)){var e,t,i,w=!document.getElementById("slide_frame-"+p);if(w||jQuery(".wppa-film-"+p).removeClass("wppa-filmthumb-active"),_wppaFilmNoMove[p]&&wppaFilmInit[p]?_wppaFilmNoMove[p]=!1:(e=wppaFilmStripLength[p]/2-(_wppaCurIdx[p]+.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmShowGlue&&(e-=2*wppaFilmStripMargin[p]+2),t=wppaFilmStripLength[p]/2-(.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],i=wppaFilmStripLength[p]/2-(-.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmInit[p]?0==_wppaCurIdx[p]&&_wppaSSRuns[p]&&_wppaLastIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+"px"}),wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:t+"px"},wppaAnimationSpeed,a)):wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e+"px"},wppaAnimationSpeed,a):(jQuery("#wppa-filmstrip-"+p).css({marginLeft:e+"px"}),setTimeout(function(){wppaFilmInit[p]=!0},200)),_wppaLastIdx[p]=_wppaCurIdx[p]),wppaMakeLazyVisible(p,!0),!w&&-1!=_wppaCurIdx[p]){_wppaCurIdx[p]-10<0&&0,_wppaCurIdx[p]+10>_wppaSlides[p].length&&_wppaSlides[p].length;for(var r=0;r<_wppaSlides[p].length;){jQuery("#film_wppatnf_"+_wppaId[p][r]+"_"+p).html()&&(""!=jQuery("#wppa-film-"+r+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+r+"-"+p).attr("title",jQuery("#wppa-film-"+r+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+r+"-"+p).attr("title",jQuery("#wppa-film-"+r+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==r?(jQuery("#wppa-film-"+r+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+r+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+r+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][r]),jQuery("#wppa-pre-"+r+"-"+p).attr("title",wppaClickToView+" "+_wppaNames[p][r]))),r++}}w||jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).addClass("wppa-filmthumb-active")}}function _wppaNext(p){if(wppaSlideWrap[p]||_wppaCurIdx[p]!=_wppaSlides[p].length-1)if(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length){var a=jQuery("#wppa-next-pagelink-"+p),e=jQuery("#wppa-first-pagelink-"+p);if(0<a.length&&"hidden"!=jQuery(a).css("visibility"))return void jQuery("#wppa-next-pagelink-"+p).trigger("click");if(0<e.length)return void jQuery(e).trigger("click")}else _wppaNextSlide(p,0)}function _wppaNextN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]>=_wppaSlides[p].length-a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]+a;_wppaNxtIdx[p]>=_wppaSlides[p].length;)_wppaNxtIdx[p]-=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaNextOnCallback(p){if(wppaSlideWrap[p]||_wppaCurIdx[p]!=_wppaSlides[p].length-1){if(_wppaSkipRated[p]){var a=_wppaCurIdx[p]+1;a==_wppaSlides[p].length&&(a=0);var e=a;if(0!=_wppaMyr[p][e]){for(++a==_wppaSlides[p].length&&(a=0);a!=e&&0!=_wppaMyr[p][a];)++a==_wppaSlides[p].length&&(a=0);e=a}_wppaNxtIdx[p]=e}else _wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0);_wppaNextSlide(p,0)}}function _wppaPrev(p){!wppaSlideWrap[p]&&0==_wppaCurIdx[p]||(_wppaNxtIdx[p]=_wppaCurIdx[p]-1,_wppaNxtIdx[p]<0?jQuery("#wppa-prev-page-last-item-"+p).trigger("click"):_wppaNextSlide(p,0))}function _wppaPrevN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]<a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]-a;_wppaNxtIdx[p]<0;)_wppaNxtIdx[p]+=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaGoto(p,a){_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,_wppaNextSlide(p,0)}function _wppaGotoRunning(p,a){_wppaIsBusy[p]?setTimeout("_wppaGotoRunning( "+p+","+a+" )",10):(_wppaSSRuns[p]=!1,_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,__wppaOverruleRun=!0,_wppaNextSlide(p,"manual"),_wppaGotoContinue(p))}function _wppaGotoContinue(p){_wppaIsBusy[p]?setTimeout("_wppaGotoContinue( "+p+" )",10):setTimeout("_wppaNextSlide( "+p+', "reset" )',wppaGetSlideshowTimeout(p)+10)}function _wppaStart(p,a){if(_wppaStopping[p])return _wppaStopping[p]--,void setTimeout(function(){_wppaStart(p,a)},(wppaAnimationSpeed+wppaGetSlideshowTimeout(p))/10);_wppaSSRuns[p]||("icons"==wppaSlideshowNavigationType?_wppaStartIcons:_wppaStartText)(p,a)}function _wppaStartIcons(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}var t=wppaIconSize(p,"1.5em",!1);-1<a?(jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaSvgHtml("Pause-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).show(),jQuery("#speed1-"+p).show(),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStartText(p,a){if(-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}-1<a?(jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(_wppaSSRuns[p]=!0,_wppaNextSlide(p,0),jQuery("#startstop-"+p).html(wppaStop),jQuery("#speed0-"+p).css("display","inline"),jQuery("#speed1-"+p).css("display","inline"),_wppaShowMetaData(p,"hide"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(wppaSlideShow):jQuery("#bc-pname-"+p).html(wppaSlideShow)),_wppaSetRatingDisplay(p)}function _wppaStop(p){_wppaStopping[p]=12,("icons"==wppaSlideshowNavigationType?_wppaStopIcons:_wppaStopText)(p)}function _wppaStopIcons(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"1.5em",!1),!1,!0)),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaStopText(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaStart+" "+wppaSlideShow),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaShowMetaData(p,"show"),jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]):jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaSpeed(p,a){"random"!=_wppaTimeOut[p]&&(a?500<_wppaTimeOut[p]&&(_wppaTimeOut[p]/=1.5):_wppaTimeOut[p]<6e4&&(_wppaTimeOut[p]*=1.5))}function _wppaLoadSpinner(p){}function _wppaUnloadSpinner(p){jQuery("#wppa-slide-spin-"+p).stop().fadeOut(),setTimeout(function(){jQuery("#wppa-slide-spin-"+p).stop().fadeOut()},1e3)}function _wppaCheckRewind(p){var a,e,t;document.getElementById("wppa-filmstrip-"+p)&&((t=Math.abs(_wppaCurIdx[p]-_wppaNxtIdx[p]))<=wppaFilmPageSize[p]||(1+wppaFilmStripLength[p]/wppaThumbnailPitch[p])/2<=t&&(a=wppaThumbnailPitch[p]*_wppaSlides[p].length,wppaFilmShowGlue&&(a+=2+2*wppaFilmStripMargin[p]),e=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),_wppaNxtIdx[p]>_wppaCurIdx[p]?e-=a:e+=a,jQuery("#wppa-filmstrip-"+p).css("margin-left",e+"px")))}function _wppaSetRatingDisplay(p){if(document.getElementById("wppa-rating-"+p)){var a,e,t,w,r=_wppaAvg[p][_wppaCurIdx[p]];if(void 0!==r){if("likes"==wppaRatingDisplayType){"void"==(w=_wppaMyr[p][_wppaCurIdx[p]])?(jQuery("#wppa-dislike-imgdiv-"+p).hide(),jQuery("#wppa-like-imgdiv-"+p).hide()):(jQuery("#wppa-dislike-imgdiv-"+p).show(),jQuery("#wppa-like-imgdiv-"+p).show());var o=r.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(r=(a=r.split("|"))[0],e=a[1],t=_wppaDisc[p][_wppaCurIdx[p]],w=_wppaMyr[p][_wppaCurIdx[p]],"graphic"==wppaRatingDisplayType)_wppaSetRd(p,r,"#wppa-avg-"),_wppaSetRd(p,w,"#wppa-rate-"),0==w?(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",t));else{if(jQuery("#wppa-numrate-avg-"+p).html(r+" ( "+e+" ) "),jQuery(".wppa-my-rat-"+p).show(),"void"==w)jQuery("#wppa-numrate-mine-"+p).html(""),jQuery(".wppa-my-rat-"+p).hide();else if(wppaRatingOnce&&0<w)jQuery("#wppa-numrate-mine-"+p).html(w);else if(w<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var n="";for(i=1;i<=wppaRatingMax;i++)w==i?n+='<span style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )">&nbsp;'+i+"&nbsp;</span>":(w>i-1&&w<i&&(n+="&nbsp;( "+w+" )&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==w?(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(t+"&bull; "),jQuery("#wppa-filler-"+p).css("display","none")}0==w?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(e)}}}function wppaGetDislikeText(p,a,e){return p}function _wppaSetRd(p,a,e){var t=parseInt(a),i=t+1,w=wppaStarOpacity+(a-t)*(1-wppaStarOpacity),r=wppaRatingMax;if("void"==a)jQuery("#wppa-my-rat-"+p).hide(),jQuery(".wppa-my-rat-"+p).hide(),jQuery(".wppa-rate-"+p).hide(),jQuery(".wppa-ratingthumb").hide(),jQuery("#wppa-numrate-mine-"+p).hide();else for(jQuery("#wppa-my-rat-"+p).show(),jQuery(".wppa-my-rat-"+p).show(),jQuery(".wppa-rate-"+p).show(),jQuery(".wppa-ratingthumb").show(),jQuery("#wppa-numrate-mine-"+p).show(),idx=1;idx<=r;idx++)"#wppa-rate-"!=e&&".wppa-rate-"!=e||jQuery(e+p+"-"+idx).attr("src")!=wppaImageDirectory+"star.ico"&&jQuery(e+p+"-"+idx).attr("src",wppaImageDirectory+"star.ico"),idx<=t?jQuery(e+p+"-"+idx).stop().fadeTo(100,1):idx==i?jQuery(e+p+"-"+idx).stop().fadeTo(100,w):jQuery(e+p+"-"+idx).stop().fadeTo(100,wppaStarOpacity)}function _wppaFollowMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,a,"#wppa-rate-")}function wppaOvlFollowMe(p,a,e){e||_wppaSetRd(p,a,".wppa-rate-")}function _wppaLeaveMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,_wppaMyr[p][_wppaCurIdx[p]],"#wppa-rate-")}function wppaOvlLeaveMe(p,a,e){_wppaSetRd(p,e,".wppa-rate-")}function _wppaValidateComment(p,a){if(a=a||_wppaId[p][_wppaCurIdx[p]],jQuery("#wppa-comname-"+p).val().length<1)return alert(wppaPleaseName),!1;if("required"==wppaEmailRequired||"optional"==wppaEmailRequired){var e=jQuery("#wppa-comemail-"+p).val();if("optional"==wppaEmailRequired&&0==e.length)return!0;var t=e.indexOf("@"),i=e.lastIndexOf(".");if(t<1||i<t+2||i+2>=e.length)return alert(wppaPleaseEmail),!1}return!(jQuery("#wppa-comment-"+p).val().length<1)||(alert(wppaPleaseComment),!1)}function _wppaGo(p){document.location=p}function _wppaBbb(p,a,e){if(!_wppaSSRuns[p]){var t="#bbb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".bbb-"+p).css("cursor","pointer");break;case"hide":jQuery(".bbb-"+p).removeAttr("title"),jQuery(".bbb-"+p).css("cursor","default");break;case"click":"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}}function _wppaUbb(p,a,e){var t="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",wppaPreviousPhoto),"r"==a&&jQuery(t).attr("title",wppaNextPhoto),jQuery(".ubb-"+p).css("cursor","pointer"),jQuery(".ubb-"+p).stop().fadeTo(200,.8),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,.8);break;case"hide":jQuery(".ubb-"+p).removeAttr("title"),jQuery(".ubb-"+p).css("cursor","default"),jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);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,e;return"random"==_wppaTimeOut[p]?(a=2*wppaAnimationSpeed,e=7*wppaAnimationSpeed,Math.floor(Math.random()*(e-a+1))+a):_wppaTimeOut[p]}
js/wppa-touch.js CHANGED
@@ -3,7 +3,7 @@
3
  // Contains swipe modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
- var wppaJsTouchVersion = '6.6.06';
7
 
8
  var wppaTriggerElementID = null;
9
  var wppaFingerCount = 0;
@@ -190,6 +190,3 @@ function wppaProcessingRoutine() {
190
 
191
  wppaTouchCancel(); // Reset
192
  }
193
-
194
- // Say we're in
195
- wppaConsoleLog( 'wppa-touch.js version '+wppaJsTouchVersion+' loaded.', 'force' );
3
  // Contains swipe modules
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
+ var wppaJsTouchVersion = '7.5.03';
7
 
8
  var wppaTriggerElementID = null;
9
  var wppaFingerCount = 0;
190
 
191
  wppaTouchCancel(); // Reset
192
  }
 
 
 
js/wppa-touch.min.js CHANGED
@@ -1,35 +1 @@
1
- // wppa-touch.js
2
- //
3
- // Contains swipe modules
4
- // Dependancies: wppa.js and default wp jQuery library
5
- //
6
-
7
- var wppaJsTouchVersion='6.6.06';var wppaTriggerElementID=null;var wppaFingerCount=0;var wppaStartX=0;var wppaStartY=0;var wppaCurX=0;var wppaCurY=0;var wppaDeltaX=0;var wppaDeltaY=0;var wppaHorzDiff=0;var wppaVertDiff=0;var wppaMinLength=72;var wppaSwipeLength=0;var wppaSwipeAngle=null;var wppaSwipeDirection=null;var wppaSwipeOnLightbox=false;var wppaSwipeMocc=0;var wppaMobileTimeStart=0;function wppaStartTime(){var d=new Date();var t=d.getTime();wppaMobileTimeStart=t;return true;}
8
- function wppaInTime(){var d=new Date();var t=d.getTime();return(t-wppaMobileTimeStart)<250;}
9
- function wppaTapLink(id,url){if(wppaInTime()){_bumpClickCount(id);document.location.href=url;}}
10
- function wppaTouchStart(event,id,mocc){wppaSwipeMocc=mocc;if(mocc==-1){wppaSwipeOnLightbox=true;event.preventDefault();}
11
- wppaFingerCount=event.touches.length;if(wppaFingerCount==1){wppaStartX=event.touches[0].pageX;wppaStartY=event.touches[0].pageY;wppaTriggerElementID=id;}else{wppaTouchCancel();}}
12
- function wppaTouchMove(event){if(wppaSwipeOnLightbox){event.preventDefault();}
13
- if(event.touches.length==1){wppaCurX=event.touches[0].pageX;wppaCurY=event.touches[0].pageY;}else{wppaTouchCancel();}}
14
- function wppaTouchEnd(event){if(wppaSwipeOnLightbox){event.preventDefault();}
15
- if(wppaFingerCount==1&&wppaCurX!=0){wppaSwipeLength=Math.round(Math.sqrt(Math.pow(wppaCurX-wppaStartX,2)+Math.pow(wppaCurY-wppaStartY,2)));if(wppaSwipeLength>=wppaMinLength){wppaCalculateAngle();wppaDetermineSwipeDirection();wppaProcessingRoutine();}}
16
- wppaTouchCancel();}
17
- function wppaTouchCancel(){wppaFingerCount=0;wppaStartX=0;wppaStartY=0;wppaCurX=0;wppaCurY=0;wppaDeltaX=0;wppaDeltaY=0;wppaHorzDiff=0;wppaVertDiff=0;wppaSwipeLength=0;wppaSwipeAngle=null;wppaSwipeDirection=null;wppaTriggerElementID=null;wppaSwipeOnLightbox=false;wppaSwipeMocc=0;}
18
- function wppaCalculateAngle(){var X=wppaStartX-wppaCurX;var Y=wppaCurY-wppaStartY;var Z=Math.round(Math.sqrt(Math.pow(X,2)+Math.pow(Y,2)));var r=Math.atan2(Y,X);wppaSwipeAngle=Math.round(r*180/Math.PI);if(wppaSwipeAngle<0){wppaSwipeAngle=360-Math.abs(wppaSwipeAngle);}}
19
- function wppaDetermineSwipeDirection(){if((wppaSwipeAngle<=45)&&(wppaSwipeAngle>=0)){wppaSwipeDirection='left';}
20
- else if((wppaSwipeAngle<=360)&&(wppaSwipeAngle>=315)){wppaSwipeDirection='left';}
21
- else if((wppaSwipeAngle>=135)&&(wppaSwipeAngle<=225)){wppaSwipeDirection='right';}
22
- else if((wppaSwipeAngle>45)&&(wppaSwipeAngle<135)){wppaSwipeDirection='down';}
23
- else{wppaSwipeDirection='up';}}
24
- function wppaProcessingRoutine(){var swipedElement=document.getElementById(wppaTriggerElementID);if(wppaSwipeOnLightbox){if(wppaSwipeDirection=='left'){wppaOvlShowNext();}
25
- else if(wppaSwipeDirection=='right'){wppaOvlShowPrev();}}
26
- else{if(wppaSwipeDirection=='right'){idx=_wppaCurIdx[wppaSwipeMocc]-1;if(idx<0){if(!wppaSlideWrap){return;}
27
- idx=_wppaSlides[wppaSwipeMocc].length-1;}
28
- wppaGotoKeepState(wppaSwipeMocc,idx);}
29
- if(wppaSwipeDirection=='left'){idx=_wppaCurIdx[wppaSwipeMocc]+1;if(idx==_wppaSlides[wppaSwipeMocc].length){if(!wppaSlideWrap){return;}
30
- idx=0;}
31
- wppaGotoKeepState(wppaSwipeMocc,idx);}
32
- else if(wppaSwipeDirection=='up'){}
33
- else if(wppaSwipeDirection=='down'){}}
34
- wppaTouchCancel();}
35
- wppaConsoleLog('wppa-touch.js version '+wppaJsTouchVersion+' loaded.','force');
1
+ var wppaJsTouchVersion="7.5.03",wppaTriggerElementID=null,wppaFingerCount=0,wppaStartX=0,wppaStartY=0,wppaCurX=0,wppaCurY=0,wppaDeltaX=0,wppaDeltaY=0,wppaHorzDiff=0,wppaVertDiff=0,wppaMinLength=72,wppaSwipeLength=0,wppaSwipeAngle=null,wppaSwipeDirection=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=0,wppaMobileTimeStart=0;function wppaStartTime(){var p=(new Date).getTime();return wppaMobileTimeStart=p,!0}function wppaInTime(){return(new Date).getTime()-wppaMobileTimeStart<250}function wppaTapLink(p,e){wppaInTime()&&(_bumpClickCount(p),document.location.href=e)}function wppaTouchStart(p,e,a){-1==(wppaSwipeMocc=a)&&(wppaSwipeOnLightbox=!0,p.preventDefault()),1==(wppaFingerCount=p.touches.length)?(wppaStartX=p.touches[0].pageX,wppaStartY=p.touches[0].pageY,wppaTriggerElementID=e):wppaTouchCancel()}function wppaTouchMove(p){wppaSwipeOnLightbox&&p.preventDefault(),1==p.touches.length?(wppaCurX=p.touches[0].pageX,wppaCurY=p.touches[0].pageY):wppaTouchCancel()}function wppaTouchEnd(p){wppaSwipeOnLightbox&&p.preventDefault(),1==wppaFingerCount&&0!=wppaCurX&&(wppaSwipeLength=Math.round(Math.sqrt(Math.pow(wppaCurX-wppaStartX,2)+Math.pow(wppaCurY-wppaStartY,2))),wppaMinLength<=wppaSwipeLength&&(wppaCalculateAngle(),wppaDetermineSwipeDirection(),wppaProcessingRoutine())),wppaTouchCancel()}function wppaTouchCancel(){wppaTriggerElementID=wppaSwipeDirection=wppaSwipeAngle=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=wppaSwipeLength=wppaVertDiff=wppaHorzDiff=wppaDeltaY=wppaDeltaX=wppaCurY=wppaCurX=wppaStartY=wppaStartX=wppaFingerCount=0}function wppaCalculateAngle(){var p=wppaStartX-wppaCurX,e=wppaCurY-wppaStartY,a=(Math.round(Math.sqrt(Math.pow(p,2)+Math.pow(e,2))),Math.atan2(e,p));(wppaSwipeAngle=Math.round(180*a/Math.PI))<0&&(wppaSwipeAngle=360-Math.abs(wppaSwipeAngle))}function wppaDetermineSwipeDirection(){wppaSwipeDirection=wppaSwipeAngle<=45&&0<=wppaSwipeAngle||wppaSwipeAngle<=360&&315<=wppaSwipeAngle?"left":135<=wppaSwipeAngle&&wppaSwipeAngle<=225?"right":45<wppaSwipeAngle&&wppaSwipeAngle<135?"down":"up"}function wppaProcessingRoutine(){document.getElementById(wppaTriggerElementID);if(wppaSwipeOnLightbox)"left"==wppaSwipeDirection?wppaOvlShowNext():"right"==wppaSwipeDirection&&wppaOvlShowPrev();else{if("right"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]-1,idx<0){if(!wppaSlideWrap)return;idx=_wppaSlides[wppaSwipeMocc].length-1}wppaGotoKeepState(wppaSwipeMocc,idx)}if("left"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]+1,idx==_wppaSlides[wppaSwipeMocc].length){if(!wppaSlideWrap)return;idx=0}wppaGotoKeepState(wppaSwipeMocc,idx)}}wppaTouchCancel()}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/wppa-utils.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // conatins common vars and functions
4
  //
5
- var wppaJsUtilsVersion = '7.5.02';
6
  var wppaDebug;
7
 
8
  // Handle animation dependant of setting for mobile
@@ -364,7 +364,6 @@ function wppaMakeLazyVisible(mocc, extended) {
364
  var d = new Date();
365
  var t0 = d.getTime();
366
  if ( t0 < ( wppaLastLazy + 250 ) ) {
367
- // wppaConsoleLog( 'MakeLazyVisible() skipped' );
368
  return;
369
  }
370
 
@@ -430,11 +429,8 @@ function wppaMakeLazyVisible(mocc, extended) {
430
  var t1 = d.getTime();
431
  wppaLastLazy = t1;
432
 
433
- // wppaConsoleLog( 'MakeLazyVisible('+mocc+') took '+(t1-t0)+' ms. Totoal count = '+c0+', modcount = '+c1 );
434
-
435
  // Redo after 500 ms when we found something to do
436
  if ( c1 > 0 ) {
437
- wppaConsoleLog( 'Redo request lazy', 'force' );
438
  setTimeout( 'wppaMakeLazyVisible('+mocc+')', 500 );
439
 
440
  // Init masonryplus
@@ -520,5 +516,3 @@ function wppaWindowWidth() {
520
  return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
521
 
522
  }
523
- // Say we're in
524
- wppaConsoleLog( 'wppa-utils.js version '+wppaJsUtilsVersion+' loaded.', 'force' );
2
  //
3
  // conatins common vars and functions
4
  //
5
+ var wppaJsUtilsVersion = '7.5.03';
6
  var wppaDebug;
7
 
8
  // Handle animation dependant of setting for mobile
364
  var d = new Date();
365
  var t0 = d.getTime();
366
  if ( t0 < ( wppaLastLazy + 250 ) ) {
 
367
  return;
368
  }
369
 
429
  var t1 = d.getTime();
430
  wppaLastLazy = t1;
431
 
 
 
432
  // Redo after 500 ms when we found something to do
433
  if ( c1 > 0 ) {
 
434
  setTimeout( 'wppaMakeLazyVisible('+mocc+')', 500 );
435
 
436
  // Init masonryplus
516
  return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
517
 
518
  }
 
 
js/wppa-utils.min.js CHANGED
@@ -1 +1 @@
1
- var wppaDebug,wppaJsUtilsVersion="7.5.02";function wppaAnimate(e,a,t,p,r){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css(a),r&&setTimeout(r,10)):jQuery(e).stop().animate(a,t,p,r)}function wppaFadeIn(e,a,t){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:""}),t&&setTimeout(t,10)):jQuery(e).stop().fadeIn(a,t)}function wppaFadeOut(e,a,t){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"none"}),t&&setTimeout(t,10)):jQuery(e).stop().fadeOut(a,t)}function wppaFadeTo(e,a,t,p){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"",opacity:t}),p&&setTimeout(p,10)):jQuery(e).stop().fadeTo(a,t,p)}function wppaTrim(e,a){var t=wppaTrimLeft(e,a);return t=wppaTrimRight(t,a)}function wppaTrimLeft(e,a){var t,p,r,n,i,o,s;switch(typeof a){case"string":for(p=(t=e).length,r=a.length;r<=p&&t.substr(0,r)==a;)p=(t=t.substr(r)).length;break;case"object":for(i=!1,s=e;!i;){for(n=0,o=s;n<a.length;)s=wppaTrimLeft(s,a[n]),n++;i=o==s}t=s;break;default:return e.replace(/^\s\s*/,"")}return t}function wppaTrimRight(e,a){var t,p,r,n,i,o,s;switch(typeof a){case"string":for(p=(t=e).length,r=a.length;r<=p&&t.substr(p-r)==a;)p=(t=t.substr(0,p-r)).length;break;case"object":for(i=!1,s=e;!i;){for(n=0,o=s;n<a.length;)s=wppaTrimRight(s,a[n]),n++;i=o==s}t=s;break;default:return e.replace(/\s\s*$/,"")}return t}function wppa_setCookie(e,a,t){var p=new Date;p.setDate(p.getDate()+t);var r=escape(a)+(null==t?"":"; expires="+p.toUTCString());document.cookie=e+"="+r}function wppa_getCookie(e){for(var a,t,p=document.cookie.split(";"),r=0;r<p.length;r++)if(a=p[r].substr(0,p[r].indexOf("=")),t=p[r].substr(p[r].indexOf("=")+1),(a=a.replace(/^\s+|\s+$/g,""))==e)return unescape(t);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,a){var t,p,r,n;"undefined"==typeof console||!wppaDebug&&"force"!=a||(t=(new Date).getTime()%864e5,t-=60*(p=Math.floor(t/36e5))*60*1e3,t-=60*(r=Math.floor(t/6e4))*1e3,n=Math.floor(t/1e3),console.log("At: "+p+":"+r+":"+n+"."+(t-=1e3*n)+" message: "+e))}function wppaSvgHtml(e,a,t,p,r,n,i,o){var s,l;switch(r=r||"0",n=n||"10",i=i||"20",o=o||"50",wppaSvgCornerStyle){case"gif":case"none":radius=r;break;case"light":radius=n;break;case"medium":radius=i;break;case"heavy":radius=o}a=a||"32px",l=t?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor);var c='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;'+(a?"height:"+a+";":"")+"fill:"+s+";background-color:"+l+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":c+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":c+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":c+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":c+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":c+='<path d="M30,0H0V30H30V0z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-11C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h11C20.8,9,21,9.2,21,9.5V20.5z"/>';break;case"Exit":c+='<path d="M30 24.398l-8.406-8.398 8.406-8.398-5.602-5.602-8.398 8.402-8.402-8.402-5.598 5.602 8.398 8.398-8.398 8.398 5.598 5.602 8.402-8.402 8.398 8.402z"></path>';break;case"Exit-2":c+='<path d="M30,0H0V30H30V0z M9 4 L15 10 L21 4 L26 9 L20 15 L26 21 L21 26 L15 20 L9 26 L4 21 L10 15 L4 9Z" />';break;case"Full-Screen":c+='<path d="M27.414 24.586l-4.586-4.586-2.828 2.828 4.586 4.586-4.586 4.586h12v-12zM12 0h-12v12l4.586-4.586 4.543 4.539 2.828-2.828-4.543-4.539zM12 22.828l-2.828-2.828-4.586 4.586-4.586-4.586v12h12l-4.586-4.586zM32 0h-12l4.586 4.586-4.543 4.539 2.828 2.828 4.543-4.539 4.586 4.586z"></path>';break;case"Full-Screen-2":c+='<path d="M30,0H0V30H30V0z M4 4 L12 4 L10 6 L14 10 L10 14 L6 10 L4 12Z M18 4 L26 4 L26 12 L24 10 L20 14 L16 10 L20 6Z M26 26 L18 26 L20 24 L16 20 L20 16 L24 20 L26 18Z M4 26 L4 18 L6 20 L10 16 L14 20 L10 24 L12 26Z" />';break;case"Exit-Full-Screen":c+='<path d="M24.586 27.414l4.586 4.586 2.828-2.828-4.586-4.586 4.586-4.586h-12v12zM0 12h12v-12l-4.586 4.586-4.539-4.543-2.828 2.828 4.539 4.543zM0 29.172l2.828 2.828 4.586-4.586 4.586 4.586v-12h-12l4.586 4.586zM20 12h12l-4.586-4.586 4.547-4.543-2.828-2.828-4.547 4.543-4.586-4.586z"></path>';break;case"Exit-Full-Screen-2":c+='<path d="M30,0H0V30H30V0z M17 17 L25 17 L23 19 L27 23 L23 27 L19 23 L17 25Z M5 17 L13 17 L13 25 L11 23 L7 27 L3 23 L7 19Z M13 13 L5 13 L7 11 L3 7 L7 3 L11 7 L13 5Z M17 13 L17 5 L19 7 L23 3 L27 7 L23 11 L25 13Z" />';break;default:c+='<path d="M30,0H0V30H30V0z" />'}return c+="</g></svg>"}var wppaLastLazy=0;function wppaMakeLazyVisible(e,a){var t,p,r,n;wppaInitMasonryPlus(),"number"!=typeof e&&(e=0),_wppaLazyDone[e]||((t=new Date).getTime()<wppaLastLazy+250||((r=0)<e?(jQuery(".wppa-lazy-"+e).each(function(){(p=jQuery(this).attr("data-src"))?wppaLazyLoad&&!wppaIsElementInViewport(this,a)||(jQuery(this).attr("src",p),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"),jQuery(this).removeClass("wppa-lazy-"+e),r++):wppaIsElementInViewport(this)&&jQuery(this).removeClass("wppa-lazy-"+e),0}),0==jQuery(".wppa-lazy-"+e).length&&(_wppaLazyDone[e]=!0),wppaInitMasonryPlus(e)):(jQuery(".wppa-lazy").each(function(){(p=jQuery(this).attr("data-src"))&&(wppaLazyLoad&&!wppaIsElementInViewport(this)||(jQuery(this).attr("src",p),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"),r++)),0}),0==jQuery(".wppa-lazy").length&&(_wppaLazyDone[0]=!0),wppaInitMasonryPlus()),n=t.getTime(),wppaLastLazy=n,0<r&&(wppaConsoleLog("Redo request lazy","force"),setTimeout("wppaMakeLazyVisible("+e+")",500),wppaInitMasonryPlus())))}function wppaIsElementInViewport(e,a){"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);var t,p=e.getBoundingClientRect();return!p||(t=wppaWindowWidth(),a&&(t*=3),0<p.bottom&&0<p.right&&p.left<t&&p.top<wppaWindowHeight())}function wppaSizeArea(){0<wppaAreaMaxFrac&&wppaAreaMaxFrac<1&&(jQuery(".wppa-thumb-area").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac),jQuery(".albumlist").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac))}function wppaIconSize(e,a,t){var p=t?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==p?a:(wppaIsMini[e]?p/2:p)+"px;"}function wppaEntityDecode(e){var a=e;return a=(a=(a=(a=(a=a.split("&amp;").join("&")).split("&gt;").join(">")).split("&lt;").join("<")).split("&quot;").join('"')).split("&#39;").join("'")}function wppaSetMaxWidthToParentWidth(e){var a=e.parentNode.clientWidth;jQuery(e).css({maxWidth:a})}function wppaWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function wppaWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}wppaConsoleLog("wppa-utils.js version "+wppaJsUtilsVersion+" loaded.","force");
1
+ var wppaDebug,wppaJsUtilsVersion="7.5.03";function wppaAnimate(e,a,t,p,r){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css(a),r&&setTimeout(r,10)):jQuery(e).stop().animate(a,t,p,r)}function wppaFadeIn(e,a,t){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:""}),t&&setTimeout(t,10)):jQuery(e).stop().fadeIn(a,t)}function wppaFadeOut(e,a,t){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"none"}),t&&setTimeout(t,10)):jQuery(e).stop().fadeOut(a,t)}function wppaFadeTo(e,a,t,p){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"",opacity:t}),p&&setTimeout(p,10)):jQuery(e).stop().fadeTo(a,t,p)}function wppaTrim(e,a){var t=wppaTrimLeft(e,a);return t=wppaTrimRight(t,a)}function wppaTrimLeft(e,a){var t,p,r,n,i,o,s;switch(typeof a){case"string":for(p=(t=e).length,r=a.length;r<=p&&t.substr(0,r)==a;)p=(t=t.substr(r)).length;break;case"object":for(i=!1,s=e;!i;){for(n=0,o=s;n<a.length;)s=wppaTrimLeft(s,a[n]),n++;i=o==s}t=s;break;default:return e.replace(/^\s\s*/,"")}return t}function wppaTrimRight(e,a){var t,p,r,n,i,o,s;switch(typeof a){case"string":for(p=(t=e).length,r=a.length;r<=p&&t.substr(p-r)==a;)p=(t=t.substr(0,p-r)).length;break;case"object":for(i=!1,s=e;!i;){for(n=0,o=s;n<a.length;)s=wppaTrimRight(s,a[n]),n++;i=o==s}t=s;break;default:return e.replace(/\s\s*$/,"")}return t}function wppa_setCookie(e,a,t){var p=new Date;p.setDate(p.getDate()+t);var r=escape(a)+(null==t?"":"; expires="+p.toUTCString());document.cookie=e+"="+r}function wppa_getCookie(e){for(var a,t,p=document.cookie.split(";"),r=0;r<p.length;r++)if(a=p[r].substr(0,p[r].indexOf("=")),t=p[r].substr(p[r].indexOf("=")+1),(a=a.replace(/^\s+|\s+$/g,""))==e)return unescape(t);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,a){var t,p,r,n;"undefined"==typeof console||!wppaDebug&&"force"!=a||(t=(new Date).getTime()%864e5,t-=60*(p=Math.floor(t/36e5))*60*1e3,t-=60*(r=Math.floor(t/6e4))*1e3,n=Math.floor(t/1e3),console.log("At: "+p+":"+r+":"+n+"."+(t-=1e3*n)+" message: "+e))}function wppaSvgHtml(e,a,t,p,r,n,i,o){var s,l;switch(r=r||"0",n=n||"10",i=i||"20",o=o||"50",wppaSvgCornerStyle){case"gif":case"none":radius=r;break;case"light":radius=n;break;case"medium":radius=i;break;case"heavy":radius=o}a=a||"32px",l=t?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor);var c='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;'+(a?"height:"+a+";":"")+"fill:"+s+";background-color:"+l+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":c+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":c+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":c+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":c+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":c+='<path d="M30,0H0V30H30V0z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-11C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h11C20.8,9,21,9.2,21,9.5V20.5z"/>';break;case"Exit":c+='<path d="M30 24.398l-8.406-8.398 8.406-8.398-5.602-5.602-8.398 8.402-8.402-8.402-5.598 5.602 8.398 8.398-8.398 8.398 5.598 5.602 8.402-8.402 8.398 8.402z"></path>';break;case"Exit-2":c+='<path d="M30,0H0V30H30V0z M9 4 L15 10 L21 4 L26 9 L20 15 L26 21 L21 26 L15 20 L9 26 L4 21 L10 15 L4 9Z" />';break;case"Full-Screen":c+='<path d="M27.414 24.586l-4.586-4.586-2.828 2.828 4.586 4.586-4.586 4.586h12v-12zM12 0h-12v12l4.586-4.586 4.543 4.539 2.828-2.828-4.543-4.539zM12 22.828l-2.828-2.828-4.586 4.586-4.586-4.586v12h12l-4.586-4.586zM32 0h-12l4.586 4.586-4.543 4.539 2.828 2.828 4.543-4.539 4.586 4.586z"></path>';break;case"Full-Screen-2":c+='<path d="M30,0H0V30H30V0z M4 4 L12 4 L10 6 L14 10 L10 14 L6 10 L4 12Z M18 4 L26 4 L26 12 L24 10 L20 14 L16 10 L20 6Z M26 26 L18 26 L20 24 L16 20 L20 16 L24 20 L26 18Z M4 26 L4 18 L6 20 L10 16 L14 20 L10 24 L12 26Z" />';break;case"Exit-Full-Screen":c+='<path d="M24.586 27.414l4.586 4.586 2.828-2.828-4.586-4.586 4.586-4.586h-12v12zM0 12h12v-12l-4.586 4.586-4.539-4.543-2.828 2.828 4.539 4.543zM0 29.172l2.828 2.828 4.586-4.586 4.586 4.586v-12h-12l4.586 4.586zM20 12h12l-4.586-4.586 4.547-4.543-2.828-2.828-4.547 4.543-4.586-4.586z"></path>';break;case"Exit-Full-Screen-2":c+='<path d="M30,0H0V30H30V0z M17 17 L25 17 L23 19 L27 23 L23 27 L19 23 L17 25Z M5 17 L13 17 L13 25 L11 23 L7 27 L3 23 L7 19Z M13 13 L5 13 L7 11 L3 7 L7 3 L11 7 L13 5Z M17 13 L17 5 L19 7 L23 3 L27 7 L23 11 L25 13Z" />';break;default:c+='<path d="M30,0H0V30H30V0z" />'}return c+="</g></svg>"}var wppaLastLazy=0;function wppaMakeLazyVisible(e,a){var t,p,r,n;wppaInitMasonryPlus(),"number"!=typeof e&&(e=0),_wppaLazyDone[e]||((t=new Date).getTime()<wppaLastLazy+250||((r=0)<e?(jQuery(".wppa-lazy-"+e).each(function(){(p=jQuery(this).attr("data-src"))?wppaLazyLoad&&!wppaIsElementInViewport(this,a)||(jQuery(this).attr("src",p),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"),jQuery(this).removeClass("wppa-lazy-"+e),r++):wppaIsElementInViewport(this)&&jQuery(this).removeClass("wppa-lazy-"+e),0}),0==jQuery(".wppa-lazy-"+e).length&&(_wppaLazyDone[e]=!0),wppaInitMasonryPlus(e)):(jQuery(".wppa-lazy").each(function(){(p=jQuery(this).attr("data-src"))&&(wppaLazyLoad&&!wppaIsElementInViewport(this)||(jQuery(this).attr("src",p),jQuery(this).removeAttr("data-src"),jQuery(this).removeClass("wppa-lazy"),r++)),0}),0==jQuery(".wppa-lazy").length&&(_wppaLazyDone[0]=!0),wppaInitMasonryPlus()),n=t.getTime(),wppaLastLazy=n,0<r&&(setTimeout("wppaMakeLazyVisible("+e+")",500),wppaInitMasonryPlus())))}function wppaIsElementInViewport(e,a){"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);var t,p=e.getBoundingClientRect();return!p||(t=wppaWindowWidth(),a&&(t*=3),0<p.bottom&&0<p.right&&p.left<t&&p.top<wppaWindowHeight())}function wppaSizeArea(){0<wppaAreaMaxFrac&&wppaAreaMaxFrac<1&&(jQuery(".wppa-thumb-area").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac),jQuery(".albumlist").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac))}function wppaIconSize(e,a,t){var p=t?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==p?a:(wppaIsMini[e]?p/2:p)+"px;"}function wppaEntityDecode(e){var a=e;return a=(a=(a=(a=(a=a.split("&amp;").join("&")).split("&gt;").join(">")).split("&lt;").join("<")).split("&quot;").join('"')).split("&#39;").join("'")}function wppaSetMaxWidthToParentWidth(e){var a=e.parentNode.clientWidth;jQuery(e).css({maxWidth:a})}function wppaWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function wppaWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}
js/wppa-zoom.js CHANGED
@@ -2,13 +2,12 @@
2
  //
3
  // contains wppa functions for simple zoomable photos
4
  //
5
- var wppaJsZoomVersion = '7.5.02';
6
-
7
- if ( typeof $ == 'undefined' ) $ = jQuery;
8
 
9
  // The main proccedure
10
  function wppaDoZoomPan() {
11
 
 
 
12
  // Wait until all the image files have been completely loaded
13
  var mocc;
14
  var args;
@@ -104,7 +103,6 @@ function wppaDoZoomPan() {
104
 
105
  // Install Resize handler
106
  $(window).on("DOMContentLoaded load resize orientationchange",onResize);
107
- // $(window).on("resizeend",setTimeout(render(mocc),200));
108
 
109
  // Do the rendering
110
  render(mocc);
@@ -149,10 +147,6 @@ function wppaDoZoomPan() {
149
  if (args.busy) return;
150
  args.busy = true;
151
 
152
- // if ( args.isLightbox ) {
153
- // if ( wppaOvlActivePanorama != args.id ) return;
154
- // }
155
-
156
  // manualControl is true when a drag on the canvas is being performed
157
  if( ! args.manualControl ) {
158
 
@@ -528,5 +522,3 @@ function wppaDoZoomPan() {
528
  }
529
 
530
  }
531
-
532
- wppaConsoleLog( 'wppa-zoom.js version '+wppaJsZoomVersion+' loaded.', 'force' );
2
  //
3
  // contains wppa functions for simple zoomable photos
4
  //
 
 
 
5
 
6
  // The main proccedure
7
  function wppaDoZoomPan() {
8
 
9
+ var $ = jQuery;
10
+
11
  // Wait until all the image files have been completely loaded
12
  var mocc;
13
  var args;
103
 
104
  // Install Resize handler
105
  $(window).on("DOMContentLoaded load resize orientationchange",onResize);
 
106
 
107
  // Do the rendering
108
  render(mocc);
147
  if (args.busy) return;
148
  args.busy = true;
149
 
 
 
 
 
150
  // manualControl is true when a drag on the canvas is being performed
151
  if( ! args.manualControl ) {
152
 
522
  }
523
 
524
  }
 
 
js/wppa-zoom.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsZoomVersion="7.5.02";function wppaDoZoomPan(){for(var e,a=!1,o=0;o<wppaZoomableData.length;o++)void 0!==wppaZoomableData[o]&&((e=wppaZoomableData[o]).image.complete?e.initialized||((e=wppaZoomableData[o]).manualControl=!1,e.deltaX=0,e.deltaY=0,e.deltaFactor=1,e.run=4,e.busy=!1,e.abort=!1,e.itemid=e.mocc+"-"+e.id,e.div=$("#wppa-pan-div-"+e.itemid),e.canvas=document.getElementById("wppa-pan-canvas-"+e.itemid),e.left=$("#wppa-pctl-left-"+e.itemid),e.right=$("#wppa-pctl-right-"+e.itemid),e.up=$("#wppa-pctl-up-"+e.itemid),e.down=$("#wppa-pctl-down-"+e.itemid),e.zoomin=$("#wppa-pctl-zoomin-"+e.itemid),e.zoomout=$("#wppa-pctl-zoomout-"+e.itemid),e.prev=$("#wppa-pctl-prev-"+e.itemid),e.next=$("#wppa-pctl-next-"+e.itemid),e.canvasWidth=e.width,e.canvasHeight=e.height,e.savedCanvasX=0,e.savedCanvasY=0,e.fromHeight=e.image.height,e.fromWidth=e.image.width,e.fromX=0,e.fromY=0,e.centerX=e.fromX+e.fromWidth/2,e.centerY=e.fromY+e.fromHeight/2,e.ctx=null,e.buttondown=!1,e.isMobile?(e.right.on("touchstart",i),e.right.on("touchend",c),e.left.on("touchstart",p),e.left.on("touchend",c),e.up.on("touchstart",r),e.up.on("touchend",c),e.down.on("touchstart",m),e.down.on("touchend",c),e.zoomin.on("touchstart",d),e.zoomin.on("touchend",c),e.zoomout.on("touchstart",s),e.zoomout.on("touchend",c)):(e.canvas.addEventListener("mousedown",h),e.canvas.addEventListener("mousemove",v),e.canvas.addEventListener("mouseup",f),e.canvas.addEventListener("mouseout",f),document.getElementById("wppa-pan-canvas-"+e.itemid).addEventListener("wheel",l),e.right.on("mousedown",i),e.right.on("mouseup",c),e.left.on("mousedown",p),e.left.on("mouseup",c),e.up.on("mousedown",r),e.up.on("mouseup",c),e.down.on("mousedown",m),e.down.on("mouseup",c),e.zoomin.on("mousedown",d),e.zoomin.on("mouseup",c),e.zoomout.on("mousedown",s),e.zoomout.on("mouseup",c)),e.isLightbox&&($("#wppa-fulls-btn").on("click",function(){abort=!0}),e.prev&&(e.prev.on("click",t),e.next.on("click",n))),$(window).on("DOMContentLoaded load resize orientationchange",w),u(o),w(),e.initialized=!0):a=!0);function u(a){if((e=wppaZoomableData[a]).isLightbox&&(wppaOvlOpen||(e.abort=!0)),e.abort)return e.ctx=null,void(e.prevctx=null);var o,t;0!=e.run&&(e.busy||(e.busy=!0,e.manualControl||(e.fromX+=e.deltaX,e.fromY+=e.deltaY,o=e.fromHeight/e.deltaFactor,t=e.fromWidth/e.deltaFactor,1!=e.deltaFactor&&o<=e.image.height&&50<o&&(e.fromX-=(t-e.fromWidth)/2,e.fromY-=(o-e.fromHeight)/2,e.fromWidth=t,e.fromHeight=o)),e.fromX=Math.max(0,Math.min(e.image.width-e.fromWidth,e.fromX)),e.fromY=Math.max(0,Math.min(e.image.height-e.fromHeight,e.fromY)),e.ctx=e.canvas.getContext("2d"),e.ctx.drawImage(e.image,e.fromX,e.fromY,e.fromWidth,e.fromHeight,0,0,e.canvas.width,e.canvas.height),e.busy=!1,0<e.run&&(e.manualControl?setTimeout(function(){u(a)},25):e.buttondown&&setTimeout(function(){u(a)},5)),e.run<5&&e.run--,e.initializing&&(e.initializing=!1,e.run--),wppaAdjustControlbar()))}function t(a){var o;a.preventDefault(),this.abort=!0,o||(o=!0,$("#wppa-overlay-ic").css({display:"none"}),$("#wppa-ovl-spin").show(),wppaOvlShowPrev())}function n(a){var o;a.preventDefault(),this.abort=!0,o||(o=!0,$("#wppa-overlay-ic").css({display:"none"}),$("#wppa-ovl-spin").show(),wppaOvlShowNext())}function i(a){var o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(a.preventDefault(),wppaZoomableData[o].run=5,wppaZoomableData[o].deltaX=3,e.buttondown=!0,u(o))}function p(a){var o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(a.preventDefault(),wppaZoomableData[o].run=5,wppaZoomableData[o].deltaX=-3,e.buttondown=!0,u(o))}function r(a){var o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(a.preventDefault(),wppaZoomableData[o].run=5,wppaZoomableData[o].deltaY=-3,e.buttondown=!0,u(o))}function m(a){var o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(a.preventDefault(),wppaZoomableData[o].run=5,wppaZoomableData[o].deltaY=3,e.buttondown=!0,u(o))}function d(a){var o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(a.preventDefault(),wppaZoomableData[o].run=5,wppaZoomableData[o].deltaFactor=1.005,e.buttondown=!0,u(o))}function s(a){var o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(a.preventDefault(),wppaZoomableData[o].run=5,wppaZoomableData[o].deltaFactor=.995,e.buttondown=!0,u(o))}function l(a){var o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(a.preventDefault(),wppaZoomableData[o].run=4,wppaZoomableData[o].deltaFactor=1+a.deltaY*wppaZoomableData[o].zoomsensitivity/(wppaIsChrome?1e4:1e3),u(o),setTimeout(function(){wppaZoomableData[o].deltaFactor=1},25),a.stopPropagation())}function c(a){var o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(a.preventDefault(),wppaZoomableData[o].deltaX=0,wppaZoomableData[o].deltaY=0,wppaZoomableData[o].deltaFactor=1,wppaZoomableData[o].isLightbox?wppaZoomableData[o].run--:wppaZoomableData[o].run=4,e.buttondown=!1)}function w(a){for(var o,t,e,n,i,p,r,m,d,s,l,c=0;c<wppaZoomableData.length;c++){wppaZoomableData[c]&&wppaZoomableData[c].canvas&&!wppaZoomableData[c].abort&&((o=wppaZoomableData[c]).isLightbox?($("#wppa-overlay-ic").css("display",""),i=(e="normal"==wppaOvlMode)?(n=window.innerWidth?window.innerWidth:screen.width,window.innerHeight?window.innerHeight:screen.height):(n=screen.width,screen.height),p=parseInt(p),r=parseInt(r),s=(d=8)+(o.controls?o.icsize+10:0)+10,l=o.image.width/o.image.height,e?(d+=2*o.borderWidth,s+=2*o.borderWidth):d=40,m=(t=(n-d)/l<i-s)?(i-(r=(p=n-d)/l)-s)/2+20:(p=l*(i-(o.controls?o.icsize:0)-24),e&&(p-=24),r=p/l,20),$("#wppa-ovl-pan-container").css({marginTop:m}),$("#wppa-overlay-ic").css({marginTop:0}),o.canvasWidth=p,o.canvasHeight=r,o.canvas.width=o.canvasWidth,o.canvas.height=o.canvasHeight,e?($("#wppa-ovl-pan-container").css({backgroundColor:o.backgroundColor,padding:o.padding,borderRadius:o.borderRadius,borderWidth:o.borderWidth,width:p,marginLeft:0}),$("#wppa-pctl-div-"+o.itemid).css({marginLeft:0}),t?$("#wppa-overlay-ic").css({marginLeft:4}):$("#wppa-overlay-ic").css({marginLeft:(n-p)/2})):($("#wppa-overlay-ic").css({marginLeft:0}),$("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:0,borderWidth:0,width:p,marginLeft:(n-p)/2}),$("#wppa-pctl-div-"+o.itemid).css({marginLeft:0}))):(o.canvasWidth=$(o.div).parent().width(),o.canvasHeight=o.canvasWidth*o.canvas.height/o.canvas.width,o.canvas.width=o.canvasWidth,o.canvas.height=o.canvasHeight),o.run=5,u(c))}}function h(a){var o,t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(o=wppaZoomableData[t],a.preventDefault(),o.manualControl=!0,o.savedCanvasX=a.offsetX,o.savedCanvasY=a.offsetY,o.run=5,u(t))}function v(a){var o,t,e,n,i=jQuery(this).attr("data-mocc");!wppaZoomableData[i]||(o=wppaZoomableData[i]).manualControl&&(t=o.canvas.width/o.fromWidth,e=(o.savedCanvasX-a.offsetX)/t+o.fromX,n=(o.savedCanvasY-a.offsetY)/t+o.fromY,0<e&&0<n&&e+o.fromWidth<o.image.width&&n+o.fromHeight<o.image.height&&(o.fromX=e,o.fromY=n,o.savedCanvasX=a.offsetX,o.savedCanvasY=a.offsetY))}function f(a){var o,t=jQuery(this).attr("data-mocc");!wppaZoomableData[t]||(o=wppaZoomableData[t]).manualControl&&(o.run=4,o.manualControl=!1)}a?setTimeout(function(){wppaDoZoomPan()},300):$("#wppa-ovl-spin").hide()}"undefined"==typeof $&&($=jQuery),wppaConsoleLog("wppa-zoom.js version "+wppaJsZoomVersion+" loaded.","force");
1
+ function wppaDoZoomPan(){for(var e,u=jQuery,a=!1,t=0;t<wppaZoomableData.length;t++)void 0!==wppaZoomableData[t]&&((e=wppaZoomableData[t]).image.complete?e.initialized||((e=wppaZoomableData[t]).manualControl=!1,e.deltaX=0,e.deltaY=0,e.deltaFactor=1,e.run=4,e.busy=!1,e.abort=!1,e.itemid=e.mocc+"-"+e.id,e.div=u("#wppa-pan-div-"+e.itemid),e.canvas=document.getElementById("wppa-pan-canvas-"+e.itemid),e.left=u("#wppa-pctl-left-"+e.itemid),e.right=u("#wppa-pctl-right-"+e.itemid),e.up=u("#wppa-pctl-up-"+e.itemid),e.down=u("#wppa-pctl-down-"+e.itemid),e.zoomin=u("#wppa-pctl-zoomin-"+e.itemid),e.zoomout=u("#wppa-pctl-zoomout-"+e.itemid),e.prev=u("#wppa-pctl-prev-"+e.itemid),e.next=u("#wppa-pctl-next-"+e.itemid),e.canvasWidth=e.width,e.canvasHeight=e.height,e.savedCanvasX=0,e.savedCanvasY=0,e.fromHeight=e.image.height,e.fromWidth=e.image.width,e.fromX=0,e.fromY=0,e.centerX=e.fromX+e.fromWidth/2,e.centerY=e.fromY+e.fromHeight/2,e.ctx=null,e.buttondown=!1,e.isMobile?(e.right.on("touchstart",i),e.right.on("touchend",c),e.left.on("touchstart",p),e.left.on("touchend",c),e.up.on("touchstart",r),e.up.on("touchend",c),e.down.on("touchstart",m),e.down.on("touchend",c),e.zoomin.on("touchstart",d),e.zoomin.on("touchend",c),e.zoomout.on("touchstart",l),e.zoomout.on("touchend",c)):(e.canvas.addEventListener("mousedown",v),e.canvas.addEventListener("mousemove",f),e.canvas.addEventListener("mouseup",b),e.canvas.addEventListener("mouseout",b),document.getElementById("wppa-pan-canvas-"+e.itemid).addEventListener("wheel",s),e.right.on("mousedown",i),e.right.on("mouseup",c),e.left.on("mousedown",p),e.left.on("mouseup",c),e.up.on("mousedown",r),e.up.on("mouseup",c),e.down.on("mousedown",m),e.down.on("mouseup",c),e.zoomin.on("mousedown",d),e.zoomin.on("mouseup",c),e.zoomout.on("mousedown",l),e.zoomout.on("mouseup",c)),e.isLightbox&&(u("#wppa-fulls-btn").on("click",function(){abort=!0}),e.prev&&(e.prev.on("click",o),e.next.on("click",n))),u(window).on("DOMContentLoaded load resize orientationchange",h),w(t),h(),e.initialized=!0):a=!0);function w(a){if((e=wppaZoomableData[a]).isLightbox&&(wppaOvlOpen||(e.abort=!0)),e.abort)return e.ctx=null,void(e.prevctx=null);var t,o;0!=e.run&&(e.busy||(e.busy=!0,e.manualControl||(e.fromX+=e.deltaX,e.fromY+=e.deltaY,t=e.fromHeight/e.deltaFactor,o=e.fromWidth/e.deltaFactor,1!=e.deltaFactor&&t<=e.image.height&&50<t&&(e.fromX-=(o-e.fromWidth)/2,e.fromY-=(t-e.fromHeight)/2,e.fromWidth=o,e.fromHeight=t)),e.fromX=Math.max(0,Math.min(e.image.width-e.fromWidth,e.fromX)),e.fromY=Math.max(0,Math.min(e.image.height-e.fromHeight,e.fromY)),e.ctx=e.canvas.getContext("2d"),e.ctx.drawImage(e.image,e.fromX,e.fromY,e.fromWidth,e.fromHeight,0,0,e.canvas.width,e.canvas.height),e.busy=!1,0<e.run&&(e.manualControl?setTimeout(function(){w(a)},25):e.buttondown&&setTimeout(function(){w(a)},5)),e.run<5&&e.run--,e.initializing&&(e.initializing=!1,e.run--),wppaAdjustControlbar()))}function o(a){var t;a.preventDefault(),this.abort=!0,t||(t=!0,u("#wppa-overlay-ic").css({display:"none"}),u("#wppa-ovl-spin").show(),wppaOvlShowPrev())}function n(a){var t;a.preventDefault(),this.abort=!0,t||(t=!0,u("#wppa-overlay-ic").css({display:"none"}),u("#wppa-ovl-spin").show(),wppaOvlShowNext())}function i(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaX=3,e.buttondown=!0,w(t))}function p(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaX=-3,e.buttondown=!0,w(t))}function r(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaY=-3,e.buttondown=!0,w(t))}function m(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaY=3,e.buttondown=!0,w(t))}function d(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaFactor=1.005,e.buttondown=!0,w(t))}function l(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=5,wppaZoomableData[t].deltaFactor=.995,e.buttondown=!0,w(t))}function s(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].run=4,wppaZoomableData[t].deltaFactor=1+a.deltaY*wppaZoomableData[t].zoomsensitivity/(wppaIsChrome?1e4:1e3),w(t),setTimeout(function(){wppaZoomableData[t].deltaFactor=1},25),a.stopPropagation())}function c(a){var t=jQuery(this).attr("data-mocc");wppaZoomableData[t]&&(a.preventDefault(),wppaZoomableData[t].deltaX=0,wppaZoomableData[t].deltaY=0,wppaZoomableData[t].deltaFactor=1,wppaZoomableData[t].isLightbox?wppaZoomableData[t].run--:wppaZoomableData[t].run=4,e.buttondown=!1)}function h(a){for(var t,o,e,n,i,p,r,m,d,l,s,c=0;c<wppaZoomableData.length;c++){wppaZoomableData[c]&&wppaZoomableData[c].canvas&&!wppaZoomableData[c].abort&&((t=wppaZoomableData[c]).isLightbox?(u("#wppa-overlay-ic").css("display",""),i=(e="normal"==wppaOvlMode)?(n=window.innerWidth?window.innerWidth:screen.width,window.innerHeight?window.innerHeight:screen.height):(n=screen.width,screen.height),p=parseInt(p),r=parseInt(r),l=(d=8)+(t.controls?t.icsize+10:0)+10,s=t.image.width/t.image.height,e?(d+=2*t.borderWidth,l+=2*t.borderWidth):d=40,m=(o=(n-d)/s<i-l)?(i-(r=(p=n-d)/s)-l)/2+20:(p=s*(i-(t.controls?t.icsize:0)-24),e&&(p-=24),r=p/s,20),u("#wppa-ovl-pan-container").css({marginTop:m}),u("#wppa-overlay-ic").css({marginTop:0}),t.canvasWidth=p,t.canvasHeight=r,t.canvas.width=t.canvasWidth,t.canvas.height=t.canvasHeight,e?(u("#wppa-ovl-pan-container").css({backgroundColor:t.backgroundColor,padding:t.padding,borderRadius:t.borderRadius,borderWidth:t.borderWidth,width:p,marginLeft:0}),u("#wppa-pctl-div-"+t.itemid).css({marginLeft:0}),o?u("#wppa-overlay-ic").css({marginLeft:4}):u("#wppa-overlay-ic").css({marginLeft:(n-p)/2})):(u("#wppa-overlay-ic").css({marginLeft:0}),u("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:0,borderWidth:0,width:p,marginLeft:(n-p)/2}),u("#wppa-pctl-div-"+t.itemid).css({marginLeft:0}))):(t.canvasWidth=u(t.div).parent().width(),t.canvasHeight=t.canvasWidth*t.canvas.height/t.canvas.width,t.canvas.width=t.canvasWidth,t.canvas.height=t.canvasHeight),t.run=5,w(c))}}function v(a){var t,o=jQuery(this).attr("data-mocc");wppaZoomableData[o]&&(t=wppaZoomableData[o],a.preventDefault(),t.manualControl=!0,t.savedCanvasX=a.offsetX,t.savedCanvasY=a.offsetY,t.run=5,w(o))}function f(a){var t,o,e,n,i=jQuery(this).attr("data-mocc");!wppaZoomableData[i]||(t=wppaZoomableData[i]).manualControl&&(o=t.canvas.width/t.fromWidth,e=(t.savedCanvasX-a.offsetX)/o+t.fromX,n=(t.savedCanvasY-a.offsetY)/o+t.fromY,0<e&&0<n&&e+t.fromWidth<t.image.width&&n+t.fromHeight<t.image.height&&(t.fromX=e,t.fromY=n,t.savedCanvasX=a.offsetX,t.savedCanvasY=a.offsetY))}function b(a){var t,o=jQuery(this).attr("data-mocc");!wppaZoomableData[o]||(t=wppaZoomableData[o]).manualControl&&(t.run=4,t.manualControl=!1)}a?setTimeout(function(){wppaDoZoomPan()},300):u("#wppa-ovl-spin").hide()}
js/wppa.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // contains common vars and functions
4
  //
5
- var wppaJsVersion = '7.5.02';
6
 
7
  var wppaIsChrome = !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);
8
 
@@ -337,11 +337,9 @@ function wppaDoInit() {
337
 
338
  // Responsive handlers
339
  jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols);
340
- // wppaDoAllAutocols();
341
 
342
  // Size scrollable areas
343
  jQuery(window).on('DOMContentLoaded load resize scroll wheel orientationchange',wppaSizeArea);
344
- // wppaSizeThumbArea();
345
 
346
  // Make Lazy load images visible
347
  jQuery(window).on('DOMContentLoaded load resize wppascrollend orientationchange', wppaMakeLazyVisible);
@@ -354,7 +352,6 @@ function wppaDoInit() {
354
  jQuery(window).on('resize', function(){
355
  var m = 1;
356
  while ( m <= wppaTopMoc ) {
357
- // wppaConsoleLog('window resize. mocc = '+m, 'force');
358
  wppaFilmInit[m] = false; // mark as not initiated
359
  jQuery( '#wppa-filmstrip-'+m ).stop(); // stop running animations
360
  _wppaAdjustFilmstrip( m ); // re-adjust by jumping
@@ -366,7 +363,6 @@ function wppaDoInit() {
366
  jQuery(window).on('wpparesizeend', function(){
367
  var m = 1;
368
  while ( m <= wppaTopMoc ) {
369
- // wppaConsoleLog('window resize end. mocc = '+m, 'force');
370
  wppaFilmInit[m] = true; // mark as not initiated
371
  m++;
372
  }
@@ -380,40 +376,33 @@ function wppaDoInit() {
380
  jQuery(".wppa-thumb-area").each(function(){
381
  if (jQuery(this).getNiceScroll) {
382
  jQuery(this).getNiceScroll().resize();
383
- // wppaConsoleLog('Resize .wppa-thumb-area nice');
384
  }
385
  });
386
 
387
  jQuery(".albumlist").each(function(){
388
  if (jQuery(this).getNiceScroll) {
389
  jQuery(this).getNiceScroll().resize();
390
- // wppaConsoleLog('Resize .albumlist nice');
391
  }
392
  });
393
 
394
  jQuery(".wppa-div").each(function(){
395
  if (jQuery(this).getNiceScroll) {
396
  jQuery(this).getNiceScroll().resize();
397
- // wppaConsoleLog('Resize .wppa-div nice');
398
  }
399
  });
400
 
401
  if (jQuery("body").getNiceScroll) {
402
  jQuery("body").getNiceScroll().resize();
403
- // wppaConsoleLog('Resize body nice');
404
  }
405
 
406
  }, 2000);
407
  });
408
 
409
-
410
  jQuery(window).trigger('resize');
411
- // jQuery(window).trigger('wppascrollend');
412
-
413
 
414
  // Protect rightclick
415
  wppaProtect();
416
-
417
  }
418
 
419
  // reasize end listener
@@ -422,7 +411,6 @@ jQuery(document).ready(function(){
422
  jQuery(window).on( 'resize load', function () {
423
  clearTimeout( wppaResizeEndTimer );
424
  wppaResizeEndTimer = setTimeout( function () {
425
- wppaConsoleLog('Resize end triggered');
426
  jQuery(window).trigger('wpparesizeend');
427
  }, wppaResizeEndDelay );
428
  });
@@ -434,7 +422,6 @@ jQuery(document).ready(function(){
434
  jQuery(window).on( 'scroll wheel touchmove', function () {
435
  clearTimeout( wppaScrollEndTimer );
436
  wppaScrollEndTimer = setTimeout( function () {
437
- // wppaConsoleLog('Scroll end triggered');
438
  jQuery(window).trigger('wppascrollend');
439
  }, wppaScrollEndDelay );
440
  });
@@ -458,19 +445,11 @@ function wppaSizeAutoDiv() {
458
  function wppaDoAllAutocols(e) {
459
 
460
  // Report where it comes from
461
- // wppaConsoleLog('Do all auto cols from '+e.type,'force');
462
-
463
  setTimeout(function(){_wppaDoAllAutocols(-1)}, wppaExtendedResizeDelay);
464
  }
465
 
466
  function _wppaDoAllAutocols(i) {
467
 
468
- // Init
469
- var t0 = Date.now();
470
- i++;
471
-
472
- // wppaConsoleLog('Doing wppaDoAllAutocols('+i+')');
473
-
474
  // Do occurrences that are responsive
475
  var mocc = 1;
476
  while ( mocc <= wppaAutoColumnWidth.length ) {
@@ -488,9 +467,6 @@ function _wppaDoAllAutocols(i) {
488
  setTimeout(function(){_wppaDoAllAutocols(i)}, wppaExtendedResizeDelay);
489
  }
490
 
491
- // Report time spent this try
492
- var t1 = Date.now();
493
- //wppaConsoleLog('Do autocols took '+(t1-t0)+' ms');
494
  return true;
495
  }
496
 
@@ -569,7 +545,6 @@ function wppaStopVideo( mocc ) {
569
  if ( video ) {
570
  if ( typeof( video.pause ) == 'function') {
571
  video.pause();
572
- // wppaConsoleLog('Video '+id[i]+' paused' );
573
  }
574
  }
575
  }
@@ -659,10 +634,10 @@ function _wppaDoAutocol( mocc, i ) {
659
  var h;
660
  var old;
661
  var exists;
662
- //wppaConsoleLog('test 1A');
663
  // Container
664
  w = jQuery('#wppa-container-'+mocc).width();
665
- //wppaConsoleLog('test 1B');
666
  // Anything to do here?
667
  var container = document.getElementById( 'wppa-container-' + mocc );
668
  if ( ! container ) {
@@ -744,9 +719,7 @@ function _wppaDoAutocol( mocc, i ) {
744
  if ( isGrid > 0 ) {
745
 
746
  // Set container linheight to 0
747
- // wppaConsoleLog('test 2A');
748
  jQuery('#wppa-container-'+mocc).css( 'line-height', '0' );
749
- // wppaConsoleLog('test 2B');
750
 
751
  // Calculate width
752
  var nItems = parseInt( ( w / wppaMaxCoverWidth ) + 0.9999 );
@@ -888,8 +861,6 @@ function wppaSetRealCalendarHeights( mocc ) {
888
  if ( ! ready ) {
889
  setTimeout(function(){wppaSetRealCalendarHeights( mocc );},100);
890
  }
891
-
892
- // wppaConsoleLog('Cal heights set mocc=' + mocc, 'force');
893
  }
894
  }
895
 
@@ -960,7 +931,6 @@ function wppaFotomotoToolbar( mocc, url ) {
960
  }
961
  else { // Not loaded yet, retry after 200 ms
962
  setTimeout('wppaFotomotoToolbar( '+mocc+',"'+url+'" )', 200 );
963
- // wppaConsoleLog('Waiting for Fotomoto' );
964
  }
965
  }
966
  }
@@ -991,12 +961,12 @@ window.onpopstate = function( event ) {
991
  occ = event.state.occur;
992
  switch ( event.state.type ) {
993
  case 'html':
 
994
  // Restore wppa container content
995
- // wppaConsoleLog('test 3A');
996
  jQuery( '#wppa-container-'+occ ).html( event.state.html );
997
- // wppaConsoleLog('test 3B');
998
  break;
999
  case 'slide':
 
1000
  // Go to specified slide without the didgoto switch to avoid a stackpush here
1001
  _wppaGoto( occ, event.state.slide );
1002
  break;
@@ -1005,11 +975,13 @@ window.onpopstate = function( event ) {
1005
  else if ( wppaUpdateAddressLine ) {
1006
 
1007
  occ = wppaFirstOccur;
 
1008
  // Restore first modified occurrences content
1009
  jQuery( '#wppa-container-'+occ ).html( wppaStartHtml[occ] );
1010
 
1011
  // Now we are back to the initial page
1012
  wppaFirstOccur = 0;
 
1013
  // If a photo number given goto that photo
1014
  if ( occ == 0 ) { // Find current occur if not yet known
1015
  var url = document.location.href;
@@ -1027,7 +999,6 @@ window.onpopstate = function( event ) {
1027
  }
1028
  if ( idx < _wppaId[occ].length ) _wppaGoto( occ, idx );
1029
  }
1030
- /* */
1031
  }
1032
  // If it is a slideshow, stop it
1033
  if ( document.getElementById('theslide0-'+occ ) ) {
@@ -1035,7 +1006,6 @@ window.onpopstate = function( event ) {
1035
  }
1036
  }
1037
  if ( typeof( wppaQRUpdate ) != 'undefined') wppaQRUpdate( document.location.href );
1038
- // wppaQRData = document.location.href; //????
1039
  };
1040
 
1041
  // Push history stack for a slideshow
@@ -1046,10 +1016,9 @@ function wppaPushStateSlide( mocc, slide, url ) {
1046
  if ( url != '' ) {
1047
  try {
1048
  history.pushState( {page: wppaHis, occur: mocc, type: 'slide', slide: slide}, "---", url );
1049
- // wppaConsoleLog('Slide history stack updated' );
1050
  }
1051
  catch( err ) {
1052
- // wppaConsoleLog('Slide history stack update failed' );
1053
  }
1054
  }
1055
  }
@@ -1118,14 +1087,11 @@ function wppaFbInit() {
1118
  setTimeout('_wppaFbInit()', 10 ); // do it async over 10 ms
1119
  }
1120
  else {
1121
- wppaConsoleLog('Fb wait' );
1122
  setTimeout('wppaFbInit()', 200 );
1123
  }
1124
  }
1125
- else {
1126
- wppaConsoleLog('Fb Init busy' );
1127
- }
1128
  }
 
1129
  function _wppaFbInit() {
1130
  FB.init( {status : true, xfbml : true } );
1131
  wppaFbInitBusy = false;
@@ -1133,12 +1099,14 @@ function _wppaFbInit() {
1133
 
1134
  // Insert ( an emoticon ) in a comment text
1135
  function wppaInsertAtCursor( elm, value ) {
 
1136
  //IE support
1137
  if ( document.selection ) {
1138
  elm.focus();
1139
  sel = document.selection.createRange();
1140
  sel.text = value;
1141
  }
 
1142
  //MOZILLA and others
1143
  else if ( elm.selectionStart || elm.selectionStart == '0') {
1144
  var startPos = elm.selectionStart;
@@ -1645,8 +1613,6 @@ function wppaInitMasonryPlus( mocc ) {
1645
  var cnt = parseInt( ( w + wppaTfMargin ) / ( wppaThumbSize * 0.75 + wppaTfMargin ) );
1646
  var colWidth = w / cnt - wppaTfMargin;
1647
 
1648
- wppaConsoleLog( 'Doing init masonry plus for mocc=' + m + ', w=' + w + ', colWidth=' + colWidth + ', count=' + cnt, 'force' );
1649
-
1650
  jQuery(".grid-item").css('visibility', 'visible');
1651
  jQuery(".grid-item-" + m).css('width', colWidth + 'px');
1652
  jQuery('#grid-' + m ).masonry({
@@ -1659,6 +1625,3 @@ function wppaInitMasonryPlus( mocc ) {
1659
  m++;
1660
  }
1661
  }
1662
-
1663
- // Say we're in
1664
- wppaConsoleLog('wppa.js version '+wppaJsVersion+' loaded.', 'force' );
2
  //
3
  // contains common vars and functions
4
  //
5
+ var wppaJsVersion = '7.5.03';
6
 
7
  var wppaIsChrome = !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);
8
 
337
 
338
  // Responsive handlers
339
  jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols);
 
340
 
341
  // Size scrollable areas
342
  jQuery(window).on('DOMContentLoaded load resize scroll wheel orientationchange',wppaSizeArea);
 
343
 
344
  // Make Lazy load images visible
345
  jQuery(window).on('DOMContentLoaded load resize wppascrollend orientationchange', wppaMakeLazyVisible);
352
  jQuery(window).on('resize', function(){
353
  var m = 1;
354
  while ( m <= wppaTopMoc ) {
 
355
  wppaFilmInit[m] = false; // mark as not initiated
356
  jQuery( '#wppa-filmstrip-'+m ).stop(); // stop running animations
357
  _wppaAdjustFilmstrip( m ); // re-adjust by jumping
363
  jQuery(window).on('wpparesizeend', function(){
364
  var m = 1;
365
  while ( m <= wppaTopMoc ) {
 
366
  wppaFilmInit[m] = true; // mark as not initiated
367
  m++;
368
  }
376
  jQuery(".wppa-thumb-area").each(function(){
377
  if (jQuery(this).getNiceScroll) {
378
  jQuery(this).getNiceScroll().resize();
 
379
  }
380
  });
381
 
382
  jQuery(".albumlist").each(function(){
383
  if (jQuery(this).getNiceScroll) {
384
  jQuery(this).getNiceScroll().resize();
 
385
  }
386
  });
387
 
388
  jQuery(".wppa-div").each(function(){
389
  if (jQuery(this).getNiceScroll) {
390
  jQuery(this).getNiceScroll().resize();
 
391
  }
392
  });
393
 
394
  if (jQuery("body").getNiceScroll) {
395
  jQuery("body").getNiceScroll().resize();
 
396
  }
397
 
398
  }, 2000);
399
  });
400
 
401
+ // Fake a resize
402
  jQuery(window).trigger('resize');
 
 
403
 
404
  // Protect rightclick
405
  wppaProtect();
 
406
  }
407
 
408
  // reasize end listener
411
  jQuery(window).on( 'resize load', function () {
412
  clearTimeout( wppaResizeEndTimer );
413
  wppaResizeEndTimer = setTimeout( function () {
 
414
  jQuery(window).trigger('wpparesizeend');
415
  }, wppaResizeEndDelay );
416
  });
422
  jQuery(window).on( 'scroll wheel touchmove', function () {
423
  clearTimeout( wppaScrollEndTimer );
424
  wppaScrollEndTimer = setTimeout( function () {
 
425
  jQuery(window).trigger('wppascrollend');
426
  }, wppaScrollEndDelay );
427
  });
445
  function wppaDoAllAutocols(e) {
446
 
447
  // Report where it comes from
 
 
448
  setTimeout(function(){_wppaDoAllAutocols(-1)}, wppaExtendedResizeDelay);
449
  }
450
 
451
  function _wppaDoAllAutocols(i) {
452
 
 
 
 
 
 
 
453
  // Do occurrences that are responsive
454
  var mocc = 1;
455
  while ( mocc <= wppaAutoColumnWidth.length ) {
467
  setTimeout(function(){_wppaDoAllAutocols(i)}, wppaExtendedResizeDelay);
468
  }
469
 
 
 
 
470
  return true;
471
  }
472
 
545
  if ( video ) {
546
  if ( typeof( video.pause ) == 'function') {
547
  video.pause();
 
548
  }
549
  }
550
  }
634
  var h;
635
  var old;
636
  var exists;
637
+
638
  // Container
639
  w = jQuery('#wppa-container-'+mocc).width();
640
+
641
  // Anything to do here?
642
  var container = document.getElementById( 'wppa-container-' + mocc );
643
  if ( ! container ) {
719
  if ( isGrid > 0 ) {
720
 
721
  // Set container linheight to 0
 
722
  jQuery('#wppa-container-'+mocc).css( 'line-height', '0' );
 
723
 
724
  // Calculate width
725
  var nItems = parseInt( ( w / wppaMaxCoverWidth ) + 0.9999 );
861
  if ( ! ready ) {
862
  setTimeout(function(){wppaSetRealCalendarHeights( mocc );},100);
863
  }
 
 
864
  }
865
  }
866
 
931
  }
932
  else { // Not loaded yet, retry after 200 ms
933
  setTimeout('wppaFotomotoToolbar( '+mocc+',"'+url+'" )', 200 );
 
934
  }
935
  }
936
  }
961
  occ = event.state.occur;
962
  switch ( event.state.type ) {
963
  case 'html':
964
+
965
  // Restore wppa container content
 
966
  jQuery( '#wppa-container-'+occ ).html( event.state.html );
 
967
  break;
968
  case 'slide':
969
+
970
  // Go to specified slide without the didgoto switch to avoid a stackpush here
971
  _wppaGoto( occ, event.state.slide );
972
  break;
975
  else if ( wppaUpdateAddressLine ) {
976
 
977
  occ = wppaFirstOccur;
978
+
979
  // Restore first modified occurrences content
980
  jQuery( '#wppa-container-'+occ ).html( wppaStartHtml[occ] );
981
 
982
  // Now we are back to the initial page
983
  wppaFirstOccur = 0;
984
+
985
  // If a photo number given goto that photo
986
  if ( occ == 0 ) { // Find current occur if not yet known
987
  var url = document.location.href;
999
  }
1000
  if ( idx < _wppaId[occ].length ) _wppaGoto( occ, idx );
1001
  }
 
1002
  }
1003
  // If it is a slideshow, stop it
1004
  if ( document.getElementById('theslide0-'+occ ) ) {
1006
  }
1007
  }
1008
  if ( typeof( wppaQRUpdate ) != 'undefined') wppaQRUpdate( document.location.href );
 
1009
  };
1010
 
1011
  // Push history stack for a slideshow
1016
  if ( url != '' ) {
1017
  try {
1018
  history.pushState( {page: wppaHis, occur: mocc, type: 'slide', slide: slide}, "---", url );
 
1019
  }
1020
  catch( err ) {
1021
+ wppaConsoleLog( 'Slide history stack update failed' );
1022
  }
1023
  }
1024
  }
1087
  setTimeout('_wppaFbInit()', 10 ); // do it async over 10 ms
1088
  }
1089
  else {
 
1090
  setTimeout('wppaFbInit()', 200 );
1091
  }
1092
  }
 
 
 
1093
  }
1094
+
1095
  function _wppaFbInit() {
1096
  FB.init( {status : true, xfbml : true } );
1097
  wppaFbInitBusy = false;
1099
 
1100
  // Insert ( an emoticon ) in a comment text
1101
  function wppaInsertAtCursor( elm, value ) {
1102
+
1103
  //IE support
1104
  if ( document.selection ) {
1105
  elm.focus();
1106
  sel = document.selection.createRange();
1107
  sel.text = value;
1108
  }
1109
+
1110
  //MOZILLA and others
1111
  else if ( elm.selectionStart || elm.selectionStart == '0') {
1112
  var startPos = elm.selectionStart;
1613
  var cnt = parseInt( ( w + wppaTfMargin ) / ( wppaThumbSize * 0.75 + wppaTfMargin ) );
1614
  var colWidth = w / cnt - wppaTfMargin;
1615
 
 
 
1616
  jQuery(".grid-item").css('visibility', 'visible');
1617
  jQuery(".grid-item-" + m).css('width', colWidth + 'px');
1618
  jQuery('#grid-' + m ).masonry({
1625
  m++;
1626
  }
1627
  }
 
 
 
js/wppa.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsVersion="7.5.02",wppaIsChrome=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime),wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth,wppaAutoColumnWidth=wppaAutoColumnWidth||[],wppaAutoColumnFrac,wppaAutoColumnFrac=wppaAutoColumnFrac||[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth,wppaColWidth=wppaColWidth||[],wppaMCRWidth,wppaMCRWidth=wppaMCRWidth||[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,wppaThumbAspect=.75,wppaFilmonlyContinuous=!1,wppaNoAnimateOnMobile=!1,wppaAjaxScroll=!0,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=200,wppaArtmonkeyFileNotSource=!1,wppaRequestInfoDialogText="Please specify your question",_wppaId=[],_wppaRealId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],_wppaLastIdx=[],_wppaLazyDone=[],_wppaStopping=[],_wppaFilename=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaThumbSize=100,wppaTfMargin=4,wppaZoomableData=[],wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeEndTimer,wppaScrollEndTimer;function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",wppaMakeLazyVisible),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaInitMasonryPlus),jQuery(window).on("resize",function(){for(var p=1;p<=wppaTopMoc;)wppaFilmInit[p]=!1,jQuery("#wppa-filmstrip-"+p).stop(),_wppaAdjustFilmstrip(p),p++}),jQuery(window).on("wpparesizeend",function(){for(var p=1;p<=wppaTopMoc;)wppaFilmInit[p]=!0,p++}),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){setTimeout(function(){jQuery(".wppa-thumb-area").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery(".albumlist").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery(".wppa-div").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery("body").getNiceScroll&&jQuery("body").getNiceScroll().resize()},2e3)}),jQuery(window).trigger("resize"),wppaProtect()}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}function wppaDoAllAutocols(p){setTimeout(function(){_wppaDoAllAutocols(-1)},wppaExtendedResizeDelay)}function _wppaDoAllAutocols(p){Date.now();p++;for(var e=1;e<=wppaAutoColumnWidth.length;)wppaAutoColumnWidth[e]&&_wppaDoAutocol(e,p),wppaMakeLazyVisible(e),e++;(p<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(p)},wppaExtendedResizeDelay);Date.now();return!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p),a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t,o,r,i,n,s=jQuery("#wppa-container-"+p).width();if(document.getElementById("wppa-container-"+p)){if(wppaCoverImageResponsive[p]||1<(a=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(a[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:s-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:s})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:s},wppaResponseSpeed))),1<(a=jQuery(".wppa-cover-box-mcr-"+p)).length){var w=document.getElementById("wppa-albumlist-"+p).clientWidth,l=parseInt((w+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,u=l-1,c=parseInt((w+wppaCoverSpacing)/l-wppaCoverSpacing);if(wppaColWidth[p]!=w||wppaMCRWidth[p]!=c){wppaColWidth[p]=w,wppaMCRWidth[p]=c;for(var d=0;d<a.length;){switch(d%l){case 0:jQuery(a[d]).css({marginLeft:"0px",clear:"both",float:"left"});break;case u:jQuery(a[d]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(a[d]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}d++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:c-wppaTextFrameDelta},wppaResponseSpeed),jQuery(a[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:c},wppaResponseSpeed)}}else{1==a.length&&(wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})))}0<jQuery(".wppa-album-cover-grid-"+p).length&&(jQuery("#wppa-container-"+p).css("line-height","0"),(t=parseInt(s/wppaMaxCoverWidth+.9999))<1&&(t=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/t+"%"})),!wppaThumbSpaceAuto||(o=parseInt(jQuery(".thumbnail-frame-"+p).css("width")))&&(r=s-wppaThumbnailAreaDelta-7,i=Math.max(1,parseInt(r/(o+wppaMinThumbSpace))),n=parseInt(.5+(r-i*o)/(i+1)),jQuery(".thumbnail-frame-"+p).css({marginLeft:n})),jQuery(".thumbnail-frame-comalt-"+p).css("width",s-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",s-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var y,m=1,h=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");h;)y=h*(s-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+m+"-"+p).css("height",y),m++,h=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",s-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*s),wppaFilmStripLength[p]=s-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",s),jQuery(".wppa-simg-"+p).css("width",s-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",s+10),jQuery(".wppa-mimg-"+p).css("width",s),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(s/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*s),wppaSetRealCalendarHeights(p),!0}}function wppaSetRealCalendarHeights(e){var a,t,p,o,r,i=jQuery("#wppa-real-calendar-"+e).width();0<i&&(a=!0,t=i*wppaThumbAspect/7,jQuery(".wppa-real-calendar-day-"+e).css({height:t}),p=i/50+2,jQuery("#wppa-real-calendar-"+e).css({fontSize:p}),o=p/4,jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:o,marginBottom:o}),r=t/2,jQuery(".wppa-realcalimg-"+e).each(function(){var p;0==this.height?a=!1:(p=jQuery(this).attr("data-day"),thisb=r-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb}))}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100))}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:r})}}}function wppaGetChildI(p){for(var e=p.childNodes,a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){wppaConsoleLog("Resize end triggered"),jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace(/&quot;/g,'"').replace('"]','">').replace("[/a]","</a>").replace("[img","<img").replace("/]","/>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+e).html(p.state.html);break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e&&(a=document.location.href.split("&wppa-occur="),e=parseInt(a[1]));var a=document.location.href.split("&wppa-photo="),t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy?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,e){var a,t;document.selection?(p.focus(),sel=document.selection.createRange(),sel.text=e):p.selectionStart||"0"==p.selectionStart?(a=p.selectionStart,t=p.selectionEnd,p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length):p.value+=e}function wppaGeoInit(p,e,a){var t=new google.maps.LatLng(e,a),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:t},r=new google.maps.Map(document.getElementById("map-canvas-"+p),o),i=new google.maps.Marker({position:t,map:r,title:""});google.maps.event.addListener(r,"center_changed",function(){window.setTimeout(function(){r.panTo(i.getPosition())},1e3)})}function wppaEncode(p){if(void 0!==p){for(var e=(t=(t=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,t="";a<e.length;)t+=e[a],++a<e.length&&(t+="||PLUS||");return t}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var a,t=jQuery("#wppa-ss-pa-"+p).val(),o="",r="",i="";switch(t){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),o=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var n=jQuery(".wppa-ss-albumcat-"+p),i="";for(s=0;s<n.length;s++)jQuery(n[s]).prop("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(i=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");n=jQuery(".wppa-ss-albumtext-"+p);for(i="",s=0;s<n.length;s++)jQuery(n[s]).prop("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),o=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(i=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(i=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");n=jQuery(".wppa-ss-phototag-"+p);for(i="",s=0;s<n.length;s++)jQuery(n[s]).prop("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var s,n=jQuery(".wppa-ss-phototext-"+p);for(i="",s=0;s<n.length;s++)jQuery(n[s]).prop("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(r=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<r.length&&(r=r.replace("#","H")),""!=r&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=r?(wppaAjaxGetSsIptcList(p,r,"wppa-ss-iptcopts-"+p),wppaLastIptc=r):null!=(i=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=i&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(r=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<r.length&&(r=r.replace("#","H")),""!=r&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=r?(wppaAjaxGetSsExifList(p,r,"wppa-ss-exifopts-"+p),wppaLastExif=r):null!=(i=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=i&&jQuery("#wppa-ss-button-"+p).css("display","")))}}e&&(-1==(a=jQuery("#wppa-ss-pageurl-"+p).val()).indexOf("?")?a+="?":a+="&",a+="occur=1&wppa-supersearch="+t+","+o+","+r+","+i,document.location.href=a)}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,e){var a=jQuery(p).length;6<a&&(a=6),a<2&&(a=2),jQuery(e).attr("size",a)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).prop("disabled",!0),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,e,a,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}function wppaInitMasonryPlus(p){for(var e,a,t,o,r=0<parseInt(p)?e=p:(e=1,wppaTopMoc),i=e;i<=r;){document.getElementById("grid-"+i)&&(o=(a=jQuery("#wppa-container-"+i).width()-wppaThumbnailAreaDelta)/(t=parseInt((a+wppaTfMargin)/(.75*wppaThumbSize+wppaTfMargin)))-wppaTfMargin,wppaConsoleLog("Doing init masonry plus for mocc="+i+", w="+a+", colWidth="+o+", count="+t,"force"),jQuery(".grid-item").css("visibility","visible"),jQuery(".grid-item-"+i).css("width",o+"px"),jQuery("#grid-"+i).masonry({itemSelector:".grid-item-"+i,columnWidth:o,gutter:wppaTfMargin,fitWidth:!0})),i++}}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
1
+ var wppaJsVersion="7.5.03",wppaIsChrome=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime),wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth,wppaAutoColumnWidth=wppaAutoColumnWidth||[],wppaAutoColumnFrac,wppaAutoColumnFrac=wppaAutoColumnFrac||[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth,wppaColWidth=wppaColWidth||[],wppaMCRWidth,wppaMCRWidth=wppaMCRWidth||[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,wppaThumbAspect=.75,wppaFilmonlyContinuous=!1,wppaNoAnimateOnMobile=!1,wppaAjaxScroll=!0,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=200,wppaArtmonkeyFileNotSource=!1,wppaRequestInfoDialogText="Please specify your question",_wppaId=[],_wppaRealId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],_wppaLastIdx=[],_wppaLazyDone=[],_wppaStopping=[],_wppaFilename=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaThumbSize=100,wppaTfMargin=4,wppaZoomableData=[],wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeEndTimer,wppaScrollEndTimer;function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",wppaMakeLazyVisible),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaInitMasonryPlus),jQuery(window).on("resize",function(){for(var p=1;p<=wppaTopMoc;)wppaFilmInit[p]=!1,jQuery("#wppa-filmstrip-"+p).stop(),_wppaAdjustFilmstrip(p),p++}),jQuery(window).on("wpparesizeend",function(){for(var p=1;p<=wppaTopMoc;)wppaFilmInit[p]=!0,p++}),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){setTimeout(function(){jQuery(".wppa-thumb-area").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery(".albumlist").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery(".wppa-div").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery("body").getNiceScroll&&jQuery("body").getNiceScroll().resize()},2e3)}),jQuery(window).trigger("resize"),wppaProtect()}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}function wppaDoAllAutocols(p){setTimeout(function(){_wppaDoAllAutocols(-1)},wppaExtendedResizeDelay)}function _wppaDoAllAutocols(p){for(var e=1;e<=wppaAutoColumnWidth.length;)wppaAutoColumnWidth[e]&&_wppaDoAutocol(e,p),wppaMakeLazyVisible(e),e++;return(p<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(p)},wppaExtendedResizeDelay),!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p),a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t,o,r,i,n,s=jQuery("#wppa-container-"+p).width();if(document.getElementById("wppa-container-"+p)){if(wppaCoverImageResponsive[p]||1<(a=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(a[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:s-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:s})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:s},wppaResponseSpeed))),1<(a=jQuery(".wppa-cover-box-mcr-"+p)).length){var w=document.getElementById("wppa-albumlist-"+p).clientWidth,l=parseInt((w+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,u=l-1,c=parseInt((w+wppaCoverSpacing)/l-wppaCoverSpacing);if(wppaColWidth[p]!=w||wppaMCRWidth[p]!=c){wppaColWidth[p]=w,wppaMCRWidth[p]=c;for(var d=0;d<a.length;){switch(d%l){case 0:jQuery(a[d]).css({marginLeft:"0px",clear:"both",float:"left"});break;case u:jQuery(a[d]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(a[d]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}d++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:c-wppaTextFrameDelta},wppaResponseSpeed),jQuery(a[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:c},wppaResponseSpeed)}}else{1==a.length&&(wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})))}0<jQuery(".wppa-album-cover-grid-"+p).length&&(jQuery("#wppa-container-"+p).css("line-height","0"),(t=parseInt(s/wppaMaxCoverWidth+.9999))<1&&(t=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/t+"%"})),!wppaThumbSpaceAuto||(o=parseInt(jQuery(".thumbnail-frame-"+p).css("width")))&&(r=s-wppaThumbnailAreaDelta-7,i=Math.max(1,parseInt(r/(o+wppaMinThumbSpace))),n=parseInt(.5+(r-i*o)/(i+1)),jQuery(".thumbnail-frame-"+p).css({marginLeft:n})),jQuery(".thumbnail-frame-comalt-"+p).css("width",s-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",s-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var y,m=1,h=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");h;)y=h*(s-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+m+"-"+p).css("height",y),m++,h=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",s-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*s),wppaFilmStripLength[p]=s-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",s),jQuery(".wppa-simg-"+p).css("width",s-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",s+10),jQuery(".wppa-mimg-"+p).css("width",s),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(s/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*s),wppaSetRealCalendarHeights(p),!0}}function wppaSetRealCalendarHeights(e){var a,t,p,o,r,i=jQuery("#wppa-real-calendar-"+e).width();0<i&&(a=!0,t=i*wppaThumbAspect/7,jQuery(".wppa-real-calendar-day-"+e).css({height:t}),p=i/50+2,jQuery("#wppa-real-calendar-"+e).css({fontSize:p}),o=p/4,jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:o,marginBottom:o}),r=t/2,jQuery(".wppa-realcalimg-"+e).each(function(){var p;0==this.height?a=!1:(p=jQuery(this).attr("data-day"),thisb=r-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb}))}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100))}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:r})}}}function wppaGetChildI(p){for(var e=p.childNodes,a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace(/&quot;/g,'"').replace('"]','">').replace("[/a]","</a>").replace("[img","<img").replace("/]","/>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+e).html(p.state.html);break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e&&(a=document.location.href.split("&wppa-occur="),e=parseInt(a[1]));var a=document.location.href.split("&wppa-photo="),t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy||("undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,e){var a,t;document.selection?(p.focus(),sel=document.selection.createRange(),sel.text=e):p.selectionStart||"0"==p.selectionStart?(a=p.selectionStart,t=p.selectionEnd,p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length):p.value+=e}function wppaGeoInit(p,e,a){var t=new google.maps.LatLng(e,a),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:t},r=new google.maps.Map(document.getElementById("map-canvas-"+p),o),i=new google.maps.Marker({position:t,map:r,title:""});google.maps.event.addListener(r,"center_changed",function(){window.setTimeout(function(){r.panTo(i.getPosition())},1e3)})}function wppaEncode(p){if(void 0!==p){for(var e=(t=(t=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,t="";a<e.length;)t+=e[a],++a<e.length&&(t+="||PLUS||");return t}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var a,t=jQuery("#wppa-ss-pa-"+p).val(),o="",r="",i="";switch(t){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),o=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var n=jQuery(".wppa-ss-albumcat-"+p),i="";for(s=0;s<n.length;s++)jQuery(n[s]).prop("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(i=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");n=jQuery(".wppa-ss-albumtext-"+p);for(i="",s=0;s<n.length;s++)jQuery(n[s]).prop("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),o=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(i=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(i=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");n=jQuery(".wppa-ss-phototag-"+p);for(i="",s=0;s<n.length;s++)jQuery(n[s]).prop("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var s,n=jQuery(".wppa-ss-phototext-"+p);for(i="",s=0;s<n.length;s++)jQuery(n[s]).prop("selected")&&(i+="."+jQuery(n[s]).val());""!=(i=i.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(r=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<r.length&&(r=r.replace("#","H")),""!=r&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=r?(wppaAjaxGetSsIptcList(p,r,"wppa-ss-iptcopts-"+p),wppaLastIptc=r):null!=(i=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=i&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(r=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<r.length&&(r=r.replace("#","H")),""!=r&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=r?(wppaAjaxGetSsExifList(p,r,"wppa-ss-exifopts-"+p),wppaLastExif=r):null!=(i=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=i&&jQuery("#wppa-ss-button-"+p).css("display","")))}}e&&(-1==(a=jQuery("#wppa-ss-pageurl-"+p).val()).indexOf("?")?a+="?":a+="&",a+="occur=1&wppa-supersearch="+t+","+o+","+r+","+i,document.location.href=a)}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,e){var a=jQuery(p).length;6<a&&(a=6),a<2&&(a=2),jQuery(e).attr("size",a)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).prop("disabled",!0),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,e,a,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}function wppaInitMasonryPlus(p){for(var e,a,t,o=0<parseInt(p)?e=p:(e=1,wppaTopMoc),r=e;r<=o;){document.getElementById("grid-"+r)&&(t=(a=jQuery("#wppa-container-"+r).width()-wppaThumbnailAreaDelta)/parseInt((a+wppaTfMargin)/(.75*wppaThumbSize+wppaTfMargin))-wppaTfMargin,jQuery(".grid-item").css("visibility","visible"),jQuery(".grid-item-"+r).css("width",t+"px"),jQuery("#grid-"+r).masonry({itemSelector:".grid-item-"+r,columnWidth:t,gutter:wppaTfMargin,fitWidth:!0})),r++}}
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
- Version: 7.5.02.008
6
- Stable tag: 7.5.01.001
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -137,7 +137,7 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
137
 
138
  == Upgrade Notice ==
139
 
140
- = 7.5.02 =
141
 
142
  * This version addresses various bug fixes and feature requests.
143
 
2
  Contributors: opajaap
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
+ Version: 7.5.03.006
6
+ Stable tag: 7.5.02.008
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
137
 
138
  == Upgrade Notice ==
139
 
140
+ = 7.5.03 =
141
 
142
  * This version addresses various bug fixes and feature requests.
143
 
vendor/masonry/licence.txt DELETED
@@ -1,17 +0,0 @@
1
-
2
- The MIT License (MIT)
3
-
4
- Copyright © 2020 David DeSandro
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”),
7
- to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute,
8
- sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
9
- subject to the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
14
- THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
15
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
16
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
17
- OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/masonry/masonry.js DELETED
@@ -1,2504 +0,0 @@
1
- /*!
2
- * Masonry PACKAGED v4.2.2
3
- * Cascading grid layout library
4
- * https://masonry.desandro.com
5
- * MIT License
6
- * by David DeSandro
7
- */
8
-
9
- /**
10
- * Bridget makes jQuery widgets
11
- * v2.0.1
12
- * MIT license
13
- */
14
-
15
- /* jshint browser: true, strict: true, undef: true, unused: true */
16
-
17
- ( function( window, factory ) {
18
- // universal module definition
19
- /*jshint strict: false */ /* globals define, module, require */
20
- if ( typeof define == 'function' && define.amd ) {
21
- // AMD
22
- define( 'jquery-bridget/jquery-bridget',[ 'jquery' ], function( jQuery ) {
23
- return factory( window, jQuery );
24
- });
25
- } else if ( typeof module == 'object' && module.exports ) {
26
- // CommonJS
27
- module.exports = factory(
28
- window,
29
- require('jquery')
30
- );
31
- } else {
32
- // browser global
33
- window.jQueryBridget = factory(
34
- window,
35
- window.jQuery
36
- );
37
- }
38
-
39
- }( window, function factory( window, jQuery ) {
40
- 'use strict';
41
-
42
- // ----- utils ----- //
43
-
44
- var arraySlice = Array.prototype.slice;
45
-
46
- // helper function for logging errors
47
- // $.error breaks jQuery chaining
48
- var console = window.console;
49
- var logError = typeof console == 'undefined' ? function() {} :
50
- function( message ) {
51
- console.error( message );
52
- };
53
-
54
- // ----- jQueryBridget ----- //
55
-
56
- function jQueryBridget( namespace, PluginClass, $ ) {
57
- $ = $ || jQuery || window.jQuery;
58
- if ( !$ ) {
59
- return;
60
- }
61
-
62
- // add option method -> $().plugin('option', {...})
63
- if ( !PluginClass.prototype.option ) {
64
- // option setter
65
- PluginClass.prototype.option = function( opts ) {
66
- // bail out if not an object
67
- if ( !$.isPlainObject( opts ) ){
68
- return;
69
- }
70
- this.options = $.extend( true, this.options, opts );
71
- };
72
- }
73
-
74
- // make jQuery plugin
75
- $.fn[ namespace ] = function( arg0 /*, arg1 */ ) {
76
- if ( typeof arg0 == 'string' ) {
77
- // method call $().plugin( 'methodName', { options } )
78
- // shift arguments by 1
79
- var args = arraySlice.call( arguments, 1 );
80
- return methodCall( this, arg0, args );
81
- }
82
- // just $().plugin({ options })
83
- plainCall( this, arg0 );
84
- return this;
85
- };
86
-
87
- // $().plugin('methodName')
88
- function methodCall( $elems, methodName, args ) {
89
- var returnValue;
90
- var pluginMethodStr = '$().' + namespace + '("' + methodName + '")';
91
-
92
- $elems.each( function( i, elem ) {
93
- // get instance
94
- var instance = $.data( elem, namespace );
95
- if ( !instance ) {
96
- logError( namespace + ' not initialized. Cannot call methods, i.e. ' +
97
- pluginMethodStr );
98
- return;
99
- }
100
-
101
- var method = instance[ methodName ];
102
- if ( !method || methodName.charAt(0) == '_' ) {
103
- logError( pluginMethodStr + ' is not a valid method' );
104
- return;
105
- }
106
-
107
- // apply method, get return value
108
- var value = method.apply( instance, args );
109
- // set return value if value is returned, use only first value
110
- returnValue = returnValue === undefined ? value : returnValue;
111
- });
112
-
113
- return returnValue !== undefined ? returnValue : $elems;
114
- }
115
-
116
- function plainCall( $elems, options ) {
117
- $elems.each( function( i, elem ) {
118
- var instance = $.data( elem, namespace );
119
- if ( instance ) {
120
- // set options & init
121
- instance.option( options );
122
- instance._init();
123
- } else {
124
- // initialize new instance
125
- instance = new PluginClass( elem, options );
126
- $.data( elem, namespace, instance );
127
- }
128
- });
129
- }
130
-
131
- updateJQuery( $ );
132
-
133
- }
134
-
135
- // ----- updateJQuery ----- //
136
-
137
- // set $.bridget for v1 backwards compatibility
138
- function updateJQuery( $ ) {
139
- if ( !$ || ( $ && $.bridget ) ) {
140
- return;
141
- }
142
- $.bridget = jQueryBridget;
143
- }
144
-
145
- updateJQuery( jQuery || window.jQuery );
146
-
147
- // ----- ----- //
148
-
149
- return jQueryBridget;
150
-
151
- }));
152
-
153
- /**
154
- * EvEmitter v1.1.0
155
- * Lil' event emitter
156
- * MIT License
157
- */
158
-
159
- /* jshint unused: true, undef: true, strict: true */
160
-
161
- ( function( global, factory ) {
162
- // universal module definition
163
- /* jshint strict: false */ /* globals define, module, window */
164
- if ( typeof define == 'function' && define.amd ) {
165
- // AMD - RequireJS
166
- define( 'ev-emitter/ev-emitter',factory );
167
- } else if ( typeof module == 'object' && module.exports ) {
168
- // CommonJS - Browserify, Webpack
169
- module.exports = factory();
170
- } else {
171
- // Browser globals
172
- global.EvEmitter = factory();
173
- }
174
-
175
- }( typeof window != 'undefined' ? window : this, function() {
176
-
177
-
178
-
179
- function EvEmitter() {}
180
-
181
- var proto = EvEmitter.prototype;
182
-
183
- proto.on = function( eventName, listener ) {
184
- if ( !eventName || !listener ) {
185
- return;
186
- }
187
- // set events hash
188
- var events = this._events = this._events || {};
189
- // set listeners array
190
- var listeners = events[ eventName ] = events[ eventName ] || [];
191
- // only add once
192
- if ( listeners.indexOf( listener ) == -1 ) {
193
- listeners.push( listener );
194
- }
195
-
196
- return this;
197
- };
198
-
199
- proto.once = function( eventName, listener ) {
200
- if ( !eventName || !listener ) {
201
- return;
202
- }
203
- // add event
204
- this.on( eventName, listener );
205
- // set once flag
206
- // set onceEvents hash
207
- var onceEvents = this._onceEvents = this._onceEvents || {};
208
- // set onceListeners object
209
- var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};
210
- // set flag
211
- onceListeners[ listener ] = true;
212
-
213
- return this;
214
- };
215
-
216
- proto.off = function( eventName, listener ) {
217
- var listeners = this._events && this._events[ eventName ];
218
- if ( !listeners || !listeners.length ) {
219
- return;
220
- }
221
- var index = listeners.indexOf( listener );
222
- if ( index != -1 ) {
223
- listeners.splice( index, 1 );
224
- }
225
-
226
- return this;
227
- };
228
-
229
- proto.emitEvent = function( eventName, args ) {
230
- var listeners = this._events && this._events[ eventName ];
231
- if ( !listeners || !listeners.length ) {
232
- return;
233
- }
234
- // copy over to avoid interference if .off() in listener
235
- listeners = listeners.slice(0);
236
- args = args || [];
237
- // once stuff
238
- var onceListeners = this._onceEvents && this._onceEvents[ eventName ];
239
-
240
- for ( var i=0; i < listeners.length; i++ ) {
241
- var listener = listeners[i]
242
- var isOnce = onceListeners && onceListeners[ listener ];
243
- if ( isOnce ) {
244
- // remove listener
245
- // remove before trigger to prevent recursion
246
- this.off( eventName, listener );
247
- // unset once flag
248
- delete onceListeners[ listener ];
249
- }
250
- // trigger listener
251
- listener.apply( this, args );
252
- }
253
-
254
- return this;
255
- };
256
-
257
- proto.allOff = function() {
258
- delete this._events;
259
- delete this._onceEvents;
260
- };
261
-
262
- return EvEmitter;
263
-
264
- }));
265
-
266
- /*!
267
- * getSize v2.0.3
268
- * measure size of elements
269
- * MIT license
270
- */
271
-
272
- /* jshint browser: true, strict: true, undef: true, unused: true */
273
- /* globals console: false */
274
-
275
- ( function( window, factory ) {
276
- /* jshint strict: false */ /* globals define, module */
277
- if ( typeof define == 'function' && define.amd ) {
278
- // AMD
279
- define( 'get-size/get-size',factory );
280
- } else if ( typeof module == 'object' && module.exports ) {
281
- // CommonJS
282
- module.exports = factory();
283
- } else {
284
- // browser global
285
- window.getSize = factory();
286
- }
287
-
288
- })( window, function factory() {
289
- 'use strict';
290
-
291
- // -------------------------- helpers -------------------------- //
292
-
293
- // get a number from a string, not a percentage
294
- function getStyleSize( value ) {
295
- var num = parseFloat( value );
296
- // not a percent like '100%', and a number
297
- var isValid = value.indexOf('%') == -1 && !isNaN( num );
298
- return isValid && num;
299
- }
300
-
301
- function noop() {}
302
-
303
- var logError = typeof console == 'undefined' ? noop :
304
- function( message ) {
305
- console.error( message );
306
- };
307
-
308
- // -------------------------- measurements -------------------------- //
309
-
310
- var measurements = [
311
- 'paddingLeft',
312
- 'paddingRight',
313
- 'paddingTop',
314
- 'paddingBottom',
315
- 'marginLeft',
316
- 'marginRight',
317
- 'marginTop',
318
- 'marginBottom',
319
- 'borderLeftWidth',
320
- 'borderRightWidth',
321
- 'borderTopWidth',
322
- 'borderBottomWidth'
323
- ];
324
-
325
- var measurementsLength = measurements.length;
326
-
327
- function getZeroSize() {
328
- var size = {
329
- width: 0,
330
- height: 0,
331
- innerWidth: 0,
332
- innerHeight: 0,
333
- outerWidth: 0,
334
- outerHeight: 0
335
- };
336
- for ( var i=0; i < measurementsLength; i++ ) {
337
- var measurement = measurements[i];
338
- size[ measurement ] = 0;
339
- }
340
- return size;
341
- }
342
-
343
- // -------------------------- getStyle -------------------------- //
344
-
345
- /**
346
- * getStyle, get style of element, check for Firefox bug
347
- * https://bugzilla.mozilla.org/show_bug.cgi?id=548397
348
- */
349
- function getStyle( elem ) {
350
- var style = getComputedStyle( elem );
351
- if ( !style ) {
352
- logError( 'Style returned ' + style +
353
- '. Are you running this code in a hidden iframe on Firefox? ' +
354
- 'See https://bit.ly/getsizebug1' );
355
- }
356
- return style;
357
- }
358
-
359
- // -------------------------- setup -------------------------- //
360
-
361
- var isSetup = false;
362
-
363
- var isBoxSizeOuter;
364
-
365
- /**
366
- * setup
367
- * check isBoxSizerOuter
368
- * do on first getSize() rather than on page load for Firefox bug
369
- */
370
- function setup() {
371
- // setup once
372
- if ( isSetup ) {
373
- return;
374
- }
375
- isSetup = true;
376
-
377
- // -------------------------- box sizing -------------------------- //
378
-
379
- /**
380
- * Chrome & Safari measure the outer-width on style.width on border-box elems
381
- * IE11 & Firefox<29 measures the inner-width
382
- */
383
- var div = document.createElement('div');
384
- div.style.width = '200px';
385
- div.style.padding = '1px 2px 3px 4px';
386
- div.style.borderStyle = 'solid';
387
- div.style.borderWidth = '1px 2px 3px 4px';
388
- div.style.boxSizing = 'border-box';
389
-
390
- var body = document.body || document.documentElement;
391
- body.appendChild( div );
392
- var style = getStyle( div );
393
- // round value for browser zoom. desandro/masonry#928
394
- isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;
395
- getSize.isBoxSizeOuter = isBoxSizeOuter;
396
-
397
- body.removeChild( div );
398
- }
399
-
400
- // -------------------------- getSize -------------------------- //
401
-
402
- function getSize( elem ) {
403
- setup();
404
-
405
- // use querySeletor if elem is string
406
- if ( typeof elem == 'string' ) {
407
- elem = document.querySelector( elem );
408
- }
409
-
410
- // do not proceed on non-objects
411
- if ( !elem || typeof elem != 'object' || !elem.nodeType ) {
412
- return;
413
- }
414
-
415
- var style = getStyle( elem );
416
-
417
- // if hidden, everything is 0
418
- if ( style.display == 'none' ) {
419
- return getZeroSize();
420
- }
421
-
422
- var size = {};
423
- size.width = elem.offsetWidth;
424
- size.height = elem.offsetHeight;
425
-
426
- var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box';
427
-
428
- // get all measurements
429
- for ( var i=0; i < measurementsLength; i++ ) {
430
- var measurement = measurements[i];
431
- var value = style[ measurement ];
432
- var num = parseFloat( value );
433
- // any 'auto', 'medium' value will be 0
434
- size[ measurement ] = !isNaN( num ) ? num : 0;
435
- }
436
-
437
- var paddingWidth = size.paddingLeft + size.paddingRight;
438
- var paddingHeight = size.paddingTop + size.paddingBottom;
439
- var marginWidth = size.marginLeft + size.marginRight;
440
- var marginHeight = size.marginTop + size.marginBottom;
441
- var borderWidth = size.borderLeftWidth + size.borderRightWidth;
442
- var borderHeight = size.borderTopWidth + size.borderBottomWidth;
443
-
444
- var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter;
445
-
446
- // overwrite width and height if we can get it from style
447
- var styleWidth = getStyleSize( style.width );
448
- if ( styleWidth !== false ) {
449
- size.width = styleWidth +
450
- // add padding and border unless it's already including it
451
- ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth );
452
- }
453
-
454
- var styleHeight = getStyleSize( style.height );
455
- if ( styleHeight !== false ) {
456
- size.height = styleHeight +
457
- // add padding and border unless it's already including it
458
- ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight );
459
- }
460
-
461
- size.innerWidth = size.width - ( paddingWidth + borderWidth );
462
- size.innerHeight = size.height - ( paddingHeight + borderHeight );
463
-
464
- size.outerWidth = size.width + marginWidth;
465
- size.outerHeight = size.height + marginHeight;
466
-
467
- return size;
468
- }
469
-
470
- return getSize;
471
-
472
- });
473
-
474
- /**
475
- * matchesSelector v2.0.2
476
- * matchesSelector( element, '.selector' )
477
- * MIT license
478
- */
479
-
480
- /*jshint browser: true, strict: true, undef: true, unused: true */
481
-
482
- ( function( window, factory ) {
483
- /*global define: false, module: false */
484
- 'use strict';
485
- // universal module definition
486
- if ( typeof define == 'function' && define.amd ) {
487
- // AMD
488
- define( 'desandro-matches-selector/matches-selector',factory );
489
- } else if ( typeof module == 'object' && module.exports ) {
490
- // CommonJS
491
- module.exports = factory();
492
- } else {
493
- // browser global
494
- window.matchesSelector = factory();
495
- }
496
-
497
- }( window, function factory() {
498
- 'use strict';
499
-
500
- var matchesMethod = ( function() {
501
- var ElemProto = window.Element.prototype;
502
- // check for the standard method name first
503
- if ( ElemProto.matches ) {
504
- return 'matches';
505
- }
506
- // check un-prefixed
507
- if ( ElemProto.matchesSelector ) {
508
- return 'matchesSelector';
509
- }
510
- // check vendor prefixes
511
- var prefixes = [ 'webkit', 'moz', 'ms', 'o' ];
512
-
513
- for ( var i=0; i < prefixes.length; i++ ) {
514
- var prefix = prefixes[i];
515
- var method = prefix + 'MatchesSelector';
516
- if ( ElemProto[ method ] ) {
517
- return method;
518
- }
519
- }
520
- })();
521
-
522
- return function matchesSelector( elem, selector ) {
523
- return elem[ matchesMethod ]( selector );
524
- };
525
-
526
- }));
527
-
528
- /**
529
- * Fizzy UI utils v2.0.7
530
- * MIT license
531
- */
532
-
533
- /*jshint browser: true, undef: true, unused: true, strict: true */
534
-
535
- ( function( window, factory ) {
536
- // universal module definition
537
- /*jshint strict: false */ /*globals define, module, require */
538
-
539
- if ( typeof define == 'function' && define.amd ) {
540
- // AMD
541
- define( 'fizzy-ui-utils/utils',[
542
- 'desandro-matches-selector/matches-selector'
543
- ], function( matchesSelector ) {
544
- return factory( window, matchesSelector );
545
- });
546
- } else if ( typeof module == 'object' && module.exports ) {
547
- // CommonJS
548
- module.exports = factory(
549
- window,
550
- require('desandro-matches-selector')
551
- );
552
- } else {
553
- // browser global
554
- window.fizzyUIUtils = factory(
555
- window,
556
- window.matchesSelector
557
- );
558
- }
559
-
560
- }( window, function factory( window, matchesSelector ) {
561
-
562
-
563
-
564
- var utils = {};
565
-
566
- // ----- extend ----- //
567
-
568
- // extends objects
569
- utils.extend = function( a, b ) {
570
- for ( var prop in b ) {
571
- a[ prop ] = b[ prop ];
572
- }
573
- return a;
574
- };
575
-
576
- // ----- modulo ----- //
577
-
578
- utils.modulo = function( num, div ) {
579
- return ( ( num % div ) + div ) % div;
580
- };
581
-
582
- // ----- makeArray ----- //
583
-
584
- var arraySlice = Array.prototype.slice;
585
-
586
- // turn element or nodeList into an array
587
- utils.makeArray = function( obj ) {
588
- if ( Array.isArray( obj ) ) {
589
- // use object if already an array
590
- return obj;
591
- }
592
- // return empty array if undefined or null. #6
593
- if ( obj === null || obj === undefined ) {
594
- return [];
595
- }
596
-
597
- var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
598
- if ( isArrayLike ) {
599
- // convert nodeList to array
600
- return arraySlice.call( obj );
601
- }
602
-
603
- // array of single index
604
- return [ obj ];
605
- };
606
-
607
- // ----- removeFrom ----- //
608
-
609
- utils.removeFrom = function( ary, obj ) {
610
- var index = ary.indexOf( obj );
611
- if ( index != -1 ) {
612
- ary.splice( index, 1 );
613
- }
614
- };
615
-
616
- // ----- getParent ----- //
617
-
618
- utils.getParent = function( elem, selector ) {
619
- while ( elem.parentNode && elem != document.body ) {
620
- elem = elem.parentNode;
621
- if ( matchesSelector( elem, selector ) ) {
622
- return elem;
623
- }
624
- }
625
- };
626
-
627
- // ----- getQueryElement ----- //
628
-
629
- // use element as selector string
630
- utils.getQueryElement = function( elem ) {
631
- if ( typeof elem == 'string' ) {
632
- return document.querySelector( elem );
633
- }
634
- return elem;
635
- };
636
-
637
- // ----- handleEvent ----- //
638
-
639
- // enable .ontype to trigger from .addEventListener( elem, 'type' )
640
- utils.handleEvent = function( event ) {
641
- var method = 'on' + event.type;
642
- if ( this[ method ] ) {
643
- this[ method ]( event );
644
- }
645
- };
646
-
647
- // ----- filterFindElements ----- //
648
-
649
- utils.filterFindElements = function( elems, selector ) {
650
- // make array of elems
651
- elems = utils.makeArray( elems );
652
- var ffElems = [];
653
-
654
- elems.forEach( function( elem ) {
655
- // check that elem is an actual element
656
- if ( !( elem instanceof HTMLElement ) ) {
657
- return;
658
- }
659
- // add elem if no selector
660
- if ( !selector ) {
661
- ffElems.push( elem );
662
- return;
663
- }
664
- // filter & find items if we have a selector
665
- // filter
666
- if ( matchesSelector( elem, selector ) ) {
667
- ffElems.push( elem );
668
- }
669
- // find children
670
- var childElems = elem.querySelectorAll( selector );
671
- // concat childElems to filterFound array
672
- for ( var i=0; i < childElems.length; i++ ) {
673
- ffElems.push( childElems[i] );
674
- }
675
- });
676
-
677
- return ffElems;
678
- };
679
-
680
- // ----- debounceMethod ----- //
681
-
682
- utils.debounceMethod = function( _class, methodName, threshold ) {
683
- threshold = threshold || 100;
684
- // original method
685
- var method = _class.prototype[ methodName ];
686
- var timeoutName = methodName + 'Timeout';
687
-
688
- _class.prototype[ methodName ] = function() {
689
- var timeout = this[ timeoutName ];
690
- clearTimeout( timeout );
691
-
692
- var args = arguments;
693
- var _this = this;
694
- this[ timeoutName ] = setTimeout( function() {
695
- method.apply( _this, args );
696
- delete _this[ timeoutName ];
697
- }, threshold );
698
- };
699
- };
700
-
701
- // ----- docReady ----- //
702
-
703
- utils.docReady = function( callback ) {
704
- var readyState = document.readyState;
705
- if ( readyState == 'complete' || readyState == 'interactive' ) {
706
- // do async to allow for other scripts to run. metafizzy/flickity#441
707
- setTimeout( callback );
708
- } else {
709
- document.addEventListener( 'DOMContentLoaded', callback );
710
- }
711
- };
712
-
713
- // ----- htmlInit ----- //
714
-
715
- // http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/
716
- utils.toDashed = function( str ) {
717
- return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) {
718
- return $1 + '-' + $2;
719
- }).toLowerCase();
720
- };
721
-
722
- var console = window.console;
723
- /**
724
- * allow user to initialize classes via [data-namespace] or .js-namespace class
725
- * htmlInit( Widget, 'widgetName' )
726
- * options are parsed from data-namespace-options
727
- */
728
- utils.htmlInit = function( WidgetClass, namespace ) {
729
- utils.docReady( function() {
730
- var dashedNamespace = utils.toDashed( namespace );
731
- var dataAttr = 'data-' + dashedNamespace;
732
- var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' );
733
- var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace );
734
- var elems = utils.makeArray( dataAttrElems )
735
- .concat( utils.makeArray( jsDashElems ) );
736
- var dataOptionsAttr = dataAttr + '-options';
737
- var jQuery = window.jQuery;
738
-
739
- elems.forEach( function( elem ) {
740
- var attr = elem.getAttribute( dataAttr ) ||
741
- elem.getAttribute( dataOptionsAttr );
742
- var options;
743
- try {
744
- options = attr && JSON.parse( attr );
745
- } catch ( error ) {
746
- // log error, do not initialize
747
- if ( console ) {
748
- console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className +
749
- ': ' + error );
750
- }
751
- return;
752
- }
753
- // initialize
754
- var instance = new WidgetClass( elem, options );
755
- // make available via $().data('namespace')
756
- if ( jQuery ) {
757
- jQuery.data( elem, namespace, instance );
758
- }
759
- });
760
-
761
- });
762
- };
763
-
764
- // ----- ----- //
765
-
766
- return utils;
767
-
768
- }));
769
-
770
- /**
771
- * Outlayer Item
772
- */
773
-
774
- ( function( window, factory ) {
775
- // universal module definition
776
- /* jshint strict: false */ /* globals define, module, require */
777
- if ( typeof define == 'function' && define.amd ) {
778
- // AMD - RequireJS
779
- define( 'outlayer/item',[
780
- 'ev-emitter/ev-emitter',
781
- 'get-size/get-size'
782
- ],
783
- factory
784
- );
785
- } else if ( typeof module == 'object' && module.exports ) {
786
- // CommonJS - Browserify, Webpack
787
- module.exports = factory(
788
- require('ev-emitter'),
789
- require('get-size')
790
- );
791
- } else {
792
- // browser global
793
- window.Outlayer = {};
794
- window.Outlayer.Item = factory(
795
- window.EvEmitter,
796
- window.getSize
797
- );
798
- }
799
-
800
- }( window, function factory( EvEmitter, getSize ) {
801
- 'use strict';
802
-
803
- // ----- helpers ----- //
804
-
805
- function isEmptyObj( obj ) {
806
- for ( var prop in obj ) {
807
- return false;
808
- }
809
- prop = null;
810
- return true;
811
- }
812
-
813
- // -------------------------- CSS3 support -------------------------- //
814
-
815
-
816
- var docElemStyle = document.documentElement.style;
817
-
818
- var transitionProperty = typeof docElemStyle.transition == 'string' ?
819
- 'transition' : 'WebkitTransition';
820
- var transformProperty = typeof docElemStyle.transform == 'string' ?
821
- 'transform' : 'WebkitTransform';
822
-
823
- var transitionEndEvent = {
824
- WebkitTransition: 'webkitTransitionEnd',
825
- transition: 'transitionend'
826
- }[ transitionProperty ];
827
-
828
- // cache all vendor properties that could have vendor prefix
829
- var vendorProperties = {
830
- transform: transformProperty,
831
- transition: transitionProperty,
832
- transitionDuration: transitionProperty + 'Duration',
833
- transitionProperty: transitionProperty + 'Property',
834
- transitionDelay: transitionProperty + 'Delay'
835
- };
836
-
837
- // -------------------------- Item -------------------------- //
838
-
839
- function Item( element, layout ) {
840
- if ( !element ) {
841
- return;
842
- }
843
-
844
- this.element = element;
845
- // parent layout class, i.e. Masonry, Isotope, or Packery
846
- this.layout = layout;
847
- this.position = {
848
- x: 0,
849
- y: 0
850
- };
851
-
852
- this._create();
853
- }
854
-
855
- // inherit EvEmitter
856
- var proto = Item.prototype = Object.create( EvEmitter.prototype );
857
- proto.constructor = Item;
858
-
859
- proto._create = function() {
860
- // transition objects
861
- this._transn = {
862
- ingProperties: {},
863
- clean: {},
864
- onEnd: {}
865
- };
866
-
867
- this.css({
868
- position: 'absolute'
869
- });
870
- };
871
-
872
- // trigger specified handler for event type
873
- proto.handleEvent = function( event ) {
874
- var method = 'on' + event.type;
875
- if ( this[ method ] ) {
876
- this[ method ]( event );
877
- }
878
- };
879
-
880
- proto.getSize = function() {
881
- this.size = getSize( this.element );
882
- };
883
-
884
- /**
885
- * apply CSS styles to element
886
- * @param {Object} style
887
- */
888
- proto.css = function( style ) {
889
- var elemStyle = this.element.style;
890
-
891
- for ( var prop in style ) {
892
- // use vendor property if available
893
- var supportedProp = vendorProperties[ prop ] || prop;
894
- elemStyle[ supportedProp ] = style[ prop ];
895
- }
896
- };
897
-
898
- // measure position, and sets it
899
- proto.getPosition = function() {
900
- var style = getComputedStyle( this.element );
901
- var isOriginLeft = this.layout._getOption('originLeft');
902
- var isOriginTop = this.layout._getOption('originTop');
903
- var xValue = style[ isOriginLeft ? 'left' : 'right' ];
904
- var yValue = style[ isOriginTop ? 'top' : 'bottom' ];
905
- var x = parseFloat( xValue );
906
- var y = parseFloat( yValue );
907
- // convert percent to pixels
908
- var layoutSize = this.layout.size;
909
- if ( xValue.indexOf('%') != -1 ) {
910
- x = ( x / 100 ) * layoutSize.width;
911
- }
912
- if ( yValue.indexOf('%') != -1 ) {
913
- y = ( y / 100 ) * layoutSize.height;
914
- }
915
- // clean up 'auto' or other non-integer values
916
- x = isNaN( x ) ? 0 : x;
917
- y = isNaN( y ) ? 0 : y;
918
- // remove padding from measurement
919
- x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight;
920
- y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom;
921
-
922
- this.position.x = x;
923
- this.position.y = y;
924
- };
925
-
926
- // set settled position, apply padding
927
- proto.layoutPosition = function() {
928
- var layoutSize = this.layout.size;
929
- var style = {};
930
- var isOriginLeft = this.layout._getOption('originLeft');
931
- var isOriginTop = this.layout._getOption('originTop');
932
-
933
- // x
934
- var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight';
935
- var xProperty = isOriginLeft ? 'left' : 'right';
936
- var xResetProperty = isOriginLeft ? 'right' : 'left';
937
-
938
- var x = this.position.x + layoutSize[ xPadding ];
939
- // set in percentage or pixels
940
- style[ xProperty ] = this.getXValue( x );
941
- // reset other property
942
- style[ xResetProperty ] = '';
943
-
944
- // y
945
- var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom';
946
- var yProperty = isOriginTop ? 'top' : 'bottom';
947
- var yResetProperty = isOriginTop ? 'bottom' : 'top';
948
-
949
- var y = this.position.y + layoutSize[ yPadding ];
950
- // set in percentage or pixels
951
- style[ yProperty ] = this.getYValue( y );
952
- // reset other property
953
- style[ yResetProperty ] = '';
954
-
955
- this.css( style );
956
- this.emitEvent( 'layout', [ this ] );
957
- };
958
-
959
- proto.getXValue = function( x ) {
960
- var isHorizontal = this.layout._getOption('horizontal');
961
- return this.layout.options.percentPosition && !isHorizontal ?
962
- ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px';
963
- };
964
-
965
- proto.getYValue = function( y ) {
966
- var isHorizontal = this.layout._getOption('horizontal');
967
- return this.layout.options.percentPosition && isHorizontal ?
968
- ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px';
969
- };
970
-
971
- proto._transitionTo = function( x, y ) {
972
- this.getPosition();
973
- // get current x & y from top/left
974
- var curX = this.position.x;
975
- var curY = this.position.y;
976
-
977
- var didNotMove = x == this.position.x && y == this.position.y;
978
-
979
- // save end position
980
- this.setPosition( x, y );
981
-
982
- // if did not move and not transitioning, just go to layout
983
- if ( didNotMove && !this.isTransitioning ) {
984
- this.layoutPosition();
985
- return;
986
- }
987
-
988
- var transX = x - curX;
989
- var transY = y - curY;
990
- var transitionStyle = {};
991
- transitionStyle.transform = this.getTranslate( transX, transY );
992
-
993
- this.transition({
994
- to: transitionStyle,
995
- onTransitionEnd: {
996
- transform: this.layoutPosition
997
- },
998
- isCleaning: true
999
- });
1000
- };
1001
-
1002
- proto.getTranslate = function( x, y ) {
1003
- // flip cooridinates if origin on right or bottom
1004
- var isOriginLeft = this.layout._getOption('originLeft');
1005
- var isOriginTop = this.layout._getOption('originTop');
1006
- x = isOriginLeft ? x : -x;
1007
- y = isOriginTop ? y : -y;
1008
- return 'translate3d(' + x + 'px, ' + y + 'px, 0)';
1009
- };
1010
-
1011
- // non transition + transform support
1012
- proto.goTo = function( x, y ) {
1013
- this.setPosition( x, y );
1014
- this.layoutPosition();
1015
- };
1016
-
1017
- proto.moveTo = proto._transitionTo;
1018
-
1019
- proto.setPosition = function( x, y ) {
1020
- this.position.x = parseFloat( x );
1021
- this.position.y = parseFloat( y );
1022
- };
1023
-
1024
- // ----- transition ----- //
1025
-
1026
- /**
1027
- * @param {Object} style - CSS
1028
- * @param {Function} onTransitionEnd
1029
- */
1030
-
1031
- // non transition, just trigger callback
1032
- proto._nonTransition = function( args ) {
1033
- this.css( args.to );
1034
- if ( args.isCleaning ) {
1035
- this._removeStyles( args.to );
1036
- }
1037
- for ( var prop in args.onTransitionEnd ) {
1038
- args.onTransitionEnd[ prop ].call( this );
1039
- }
1040
- };
1041
-
1042
- /**
1043
- * proper transition
1044
- * @param {Object} args - arguments
1045
- * @param {Object} to - style to transition to
1046
- * @param {Object} from - style to start transition from
1047
- * @param {Boolean} isCleaning - removes transition styles after transition
1048
- * @param {Function} onTransitionEnd - callback
1049
- */
1050
- proto.transition = function( args ) {
1051
- // redirect to nonTransition if no transition duration
1052
- if ( !parseFloat( this.layout.options.transitionDuration ) ) {
1053
- this._nonTransition( args );
1054
- return;
1055
- }
1056
-
1057
- var _transition = this._transn;
1058
- // keep track of onTransitionEnd callback by css property
1059
- for ( var prop in args.onTransitionEnd ) {
1060
- _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ];
1061
- }
1062
- // keep track of properties that are transitioning
1063
- for ( prop in args.to ) {
1064
- _transition.ingProperties[ prop ] = true;
1065
- // keep track of properties to clean up when transition is done
1066
- if ( args.isCleaning ) {
1067
- _transition.clean[ prop ] = true;
1068
- }
1069
- }
1070
-
1071
- // set from styles
1072
- if ( args.from ) {
1073
- this.css( args.from );
1074
- // force redraw. http://blog.alexmaccaw.com/css-transitions
1075
- var h = this.element.offsetHeight;
1076
- // hack for JSHint to hush about unused var
1077
- h = null;
1078
- }
1079
- // enable transition
1080
- this.enableTransition( args.to );
1081
- // set styles that are transitioning
1082
- this.css( args.to );
1083
-
1084
- this.isTransitioning = true;
1085
-
1086
- };
1087
-
1088
- // dash before all cap letters, including first for
1089
- // WebkitTransform => -webkit-transform
1090
- function toDashedAll( str ) {
1091
- return str.replace( /([A-Z])/g, function( $1 ) {
1092
- return '-' + $1.toLowerCase();
1093
- });
1094
- }
1095
-
1096
- var transitionProps = 'opacity,' + toDashedAll( transformProperty );
1097
-
1098
- proto.enableTransition = function(/* style */) {
1099
- // HACK changing transitionProperty during a transition
1100
- // will cause transition to jump
1101
- if ( this.isTransitioning ) {
1102
- return;
1103
- }
1104
-
1105
- // make `transition: foo, bar, baz` from style object
1106
- // HACK un-comment this when enableTransition can work
1107
- // while a transition is happening
1108
- // var transitionValues = [];
1109
- // for ( var prop in style ) {
1110
- // // dash-ify camelCased properties like WebkitTransition
1111
- // prop = vendorProperties[ prop ] || prop;
1112
- // transitionValues.push( toDashedAll( prop ) );
1113
- // }
1114
- // munge number to millisecond, to match stagger
1115
- var duration = this.layout.options.transitionDuration;
1116
- duration = typeof duration == 'number' ? duration + 'ms' : duration;
1117
- // enable transition styles
1118
- this.css({
1119
- transitionProperty: transitionProps,
1120
- transitionDuration: duration,
1121
- transitionDelay: this.staggerDelay || 0
1122
- });
1123
- // listen for transition end event
1124
- this.element.addEventListener( transitionEndEvent, this, false );
1125
- };
1126
-
1127
- // ----- events ----- //
1128
-
1129
- proto.onwebkitTransitionEnd = function( event ) {
1130
- this.ontransitionend( event );
1131
- };
1132
-
1133
- proto.onotransitionend = function( event ) {
1134
- this.ontransitionend( event );
1135
- };
1136
-
1137
- // properties that I munge to make my life easier
1138
- var dashedVendorProperties = {
1139
- '-webkit-transform': 'transform'
1140
- };
1141
-
1142
- proto.ontransitionend = function( event ) {
1143
- // disregard bubbled events from children
1144
- if ( event.target !== this.element ) {
1145
- return;
1146
- }
1147
- var _transition = this._transn;
1148
- // get property name of transitioned property, convert to prefix-free
1149
- var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName;
1150
-
1151
- // remove property that has completed transitioning
1152
- delete _transition.ingProperties[ propertyName ];
1153
- // check if any properties are still transitioning
1154
- if ( isEmptyObj( _transition.ingProperties ) ) {
1155
- // all properties have completed transitioning
1156
- this.disableTransition();
1157
- }
1158
- // clean style
1159
- if ( propertyName in _transition.clean ) {
1160
- // clean up style
1161
- this.element.style[ event.propertyName ] = '';
1162
- delete _transition.clean[ propertyName ];
1163
- }
1164
- // trigger onTransitionEnd callback
1165
- if ( propertyName in _transition.onEnd ) {
1166
- var onTransitionEnd = _transition.onEnd[ propertyName ];
1167
- onTransitionEnd.call( this );
1168
- delete _transition.onEnd[ propertyName ];
1169
- }
1170
-
1171
- this.emitEvent( 'transitionEnd', [ this ] );
1172
- };
1173
-
1174
- proto.disableTransition = function() {
1175
- this.removeTransitionStyles();
1176
- this.element.removeEventListener( transitionEndEvent, this, false );
1177
- this.isTransitioning = false;
1178
- };
1179
-
1180
- /**
1181
- * removes style property from element
1182
- * @param {Object} style
1183
- **/
1184
- proto._removeStyles = function( style ) {
1185
- // clean up transition styles
1186
- var cleanStyle = {};
1187
- for ( var prop in style ) {
1188
- cleanStyle[ prop ] = '';
1189
- }
1190
- this.css( cleanStyle );
1191
- };
1192
-
1193
- var cleanTransitionStyle = {
1194
- transitionProperty: '',
1195
- transitionDuration: '',
1196
- transitionDelay: ''
1197
- };
1198
-
1199
- proto.removeTransitionStyles = function() {
1200
- // remove transition
1201
- this.css( cleanTransitionStyle );
1202
- };
1203
-
1204
- // ----- stagger ----- //
1205
-
1206
- proto.stagger = function( delay ) {
1207
- delay = isNaN( delay ) ? 0 : delay;
1208
- this.staggerDelay = delay + 'ms';
1209
- };
1210
-
1211
- // ----- show/hide/remove ----- //
1212
-
1213
- // remove element from DOM
1214
- proto.removeElem = function() {
1215
- this.element.parentNode.removeChild( this.element );
1216
- // remove display: none
1217
- this.css({ display: '' });
1218
- this.emitEvent( 'remove', [ this ] );
1219
- };
1220
-
1221
- proto.remove = function() {
1222
- // just remove element if no transition support or no transition
1223
- if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) {
1224
- this.removeElem();
1225
- return;
1226
- }
1227
-
1228
- // start transition
1229
- this.once( 'transitionEnd', function() {
1230
- this.removeElem();
1231
- });
1232
- this.hide();
1233
- };
1234
-
1235
- proto.reveal = function() {
1236
- delete this.isHidden;
1237
- // remove display: none
1238
- this.css({ display: '' });
1239
-
1240
- var options = this.layout.options;
1241
-
1242
- var onTransitionEnd = {};
1243
- var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle');
1244
- onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd;
1245
-
1246
- this.transition({
1247
- from: options.hiddenStyle,
1248
- to: options.visibleStyle,
1249
- isCleaning: true,
1250
- onTransitionEnd: onTransitionEnd
1251
- });
1252
- };
1253
-
1254
- proto.onRevealTransitionEnd = function() {
1255
- // check if still visible
1256
- // during transition, item may have been hidden
1257
- if ( !this.isHidden ) {
1258
- this.emitEvent('reveal');
1259
- }
1260
- };
1261
-
1262
- /**
1263
- * get style property use for hide/reveal transition end
1264
- * @param {String} styleProperty - hiddenStyle/visibleStyle
1265
- * @returns {String}
1266
- */
1267
- proto.getHideRevealTransitionEndProperty = function( styleProperty ) {
1268
- var optionStyle = this.layout.options[ styleProperty ];
1269
- // use opacity
1270
- if ( optionStyle.opacity ) {
1271
- return 'opacity';
1272
- }
1273
- // get first property
1274
- for ( var prop in optionStyle ) {
1275
- return prop;
1276
- }
1277
- };
1278
-
1279
- proto.hide = function() {
1280
- // set flag
1281
- this.isHidden = true;
1282
- // remove display: none
1283
- this.css({ display: '' });
1284
-
1285
- var options = this.layout.options;
1286
-
1287
- var onTransitionEnd = {};
1288
- var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle');
1289
- onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd;
1290
-
1291
- this.transition({
1292
- from: options.visibleStyle,
1293
- to: options.hiddenStyle,
1294
- // keep hidden stuff hidden
1295
- isCleaning: true,
1296
- onTransitionEnd: onTransitionEnd
1297
- });
1298
- };
1299
-
1300
- proto.onHideTransitionEnd = function() {
1301
- // check if still hidden
1302
- // during transition, item may have been un-hidden
1303
- if ( this.isHidden ) {
1304
- this.css({ display: 'none' });
1305
- this.emitEvent('hide');
1306
- }
1307
- };
1308
-
1309
- proto.destroy = function() {
1310
- this.css({
1311
- position: '',
1312
- left: '',
1313
- right: '',
1314
- top: '',
1315
- bottom: '',
1316
- transition: '',
1317
- transform: ''
1318
- });
1319
- };
1320
-
1321
- return Item;
1322
-
1323
- }));
1324
-
1325
- /*!
1326
- * Outlayer v2.1.1
1327
- * the brains and guts of a layout library
1328
- * MIT license
1329
- */
1330
-
1331
- ( function( window, factory ) {
1332
- 'use strict';
1333
- // universal module definition
1334
- /* jshint strict: false */ /* globals define, module, require */
1335
- if ( typeof define == 'function' && define.amd ) {
1336
- // AMD - RequireJS
1337
- define( 'outlayer/outlayer',[
1338
- 'ev-emitter/ev-emitter',
1339
- 'get-size/get-size',
1340
- 'fizzy-ui-utils/utils',
1341
- './item'
1342
- ],
1343
- function( EvEmitter, getSize, utils, Item ) {
1344
- return factory( window, EvEmitter, getSize, utils, Item);
1345
- }
1346
- );
1347
- } else if ( typeof module == 'object' && module.exports ) {
1348
- // CommonJS - Browserify, Webpack
1349
- module.exports = factory(
1350
- window,
1351
- require('ev-emitter'),
1352
- require('get-size'),
1353
- require('fizzy-ui-utils'),
1354
- require('./item')
1355
- );
1356
- } else {
1357
- // browser global
1358
- window.Outlayer = factory(
1359
- window,
1360
- window.EvEmitter,
1361
- window.getSize,
1362
- window.fizzyUIUtils,
1363
- window.Outlayer.Item
1364
- );
1365
- }
1366
-
1367
- }( window, function factory( window, EvEmitter, getSize, utils, Item ) {
1368
- 'use strict';
1369
-
1370
- // ----- vars ----- //
1371
-
1372
- var console = window.console;
1373
- var jQuery = window.jQuery;
1374
- var noop = function() {};
1375
-
1376
- // -------------------------- Outlayer -------------------------- //
1377
-
1378
- // globally unique identifiers
1379
- var GUID = 0;
1380
- // internal store of all Outlayer intances
1381
- var instances = {};
1382
-
1383
-
1384
- /**
1385
- * @param {Element, String} element
1386
- * @param {Object} options
1387
- * @constructor
1388
- */
1389
- function Outlayer( element, options ) {
1390
- var queryElement = utils.getQueryElement( element );
1391
- if ( !queryElement ) {
1392
- if ( console ) {
1393
- console.error( 'Bad element for ' + this.constructor.namespace +
1394
- ': ' + ( queryElement || element ) );
1395
- }
1396
- return;
1397
- }
1398
- this.element = queryElement;
1399
- // add jQuery
1400
- if ( jQuery ) {
1401
- this.$element = jQuery( this.element );
1402
- }
1403
-
1404
- // options
1405
- this.options = utils.extend( {}, this.constructor.defaults );
1406
- this.option( options );
1407
-
1408
- // add id for Outlayer.getFromElement
1409
- var id = ++GUID;
1410
- this.element.outlayerGUID = id; // expando
1411
- instances[ id ] = this; // associate via id
1412
-
1413
- // kick it off
1414
- this._create();
1415
-
1416
- var isInitLayout = this._getOption('initLayout');
1417
- if ( isInitLayout ) {
1418
- this.layout();
1419
- }
1420
- }
1421
-
1422
- // settings are for internal use only
1423
- Outlayer.namespace = 'outlayer';
1424
- Outlayer.Item = Item;
1425
-
1426
- // default options
1427
- Outlayer.defaults = {
1428
- containerStyle: {
1429
- position: 'relative'
1430
- },
1431
- initLayout: true,
1432
- originLeft: true,
1433
- originTop: true,
1434
- resize: true,
1435
- resizeContainer: true,
1436
- // item options
1437
- transitionDuration: '0.4s',
1438
- hiddenStyle: {
1439
- opacity: 0,
1440
- transform: 'scale(0.001)'
1441
- },
1442
- visibleStyle: {
1443
- opacity: 1,
1444
- transform: 'scale(1)'
1445
- }
1446
- };
1447
-
1448
- var proto = Outlayer.prototype;
1449
- // inherit EvEmitter
1450
- utils.extend( proto, EvEmitter.prototype );
1451
-
1452
- /**
1453
- * set options
1454
- * @param {Object} opts
1455
- */
1456
- proto.option = function( opts ) {
1457
- utils.extend( this.options, opts );
1458
- };
1459
-
1460
- /**
1461
- * get backwards compatible option value, check old name
1462
- */
1463
- proto._getOption = function( option ) {
1464
- var oldOption = this.constructor.compatOptions[ option ];
1465
- return oldOption && this.options[ oldOption ] !== undefined ?
1466
- this.options[ oldOption ] : this.options[ option ];
1467
- };
1468
-
1469
- Outlayer.compatOptions = {
1470
- // currentName: oldName
1471
- initLayout: 'isInitLayout',
1472
- horizontal: 'isHorizontal',
1473
- layoutInstant: 'isLayoutInstant',
1474
- originLeft: 'isOriginLeft',
1475
- originTop: 'isOriginTop',
1476
- resize: 'isResizeBound',
1477
- resizeContainer: 'isResizingContainer'
1478
- };
1479
-
1480
- proto._create = function() {
1481
- // get items from children
1482
- this.reloadItems();
1483
- // elements that affect layout, but are not laid out
1484
- this.stamps = [];
1485
- this.stamp( this.options.stamp );
1486
- // set container style
1487
- utils.extend( this.element.style, this.options.containerStyle );
1488
-
1489
- // bind resize method
1490
- var canBindResize = this._getOption('resize');
1491
- if ( canBindResize ) {
1492
- this.bindResize();
1493
- }
1494
- };
1495
-
1496
- // goes through all children again and gets bricks in proper order
1497
- proto.reloadItems = function() {
1498
- // collection of item elements
1499
- this.items = this._itemize( this.element.children );
1500
- };
1501
-
1502
-
1503
- /**
1504
- * turn elements into Outlayer.Items to be used in layout
1505
- * @param {Array or NodeList or HTMLElement} elems
1506
- * @returns {Array} items - collection of new Outlayer Items
1507
- */
1508
- proto._itemize = function( elems ) {
1509
-
1510
- var itemElems = this._filterFindItemElements( elems );
1511
- var Item = this.constructor.Item;
1512
-
1513
- // create new Outlayer Items for collection
1514
- var items = [];
1515
- for ( var i=0; i < itemElems.length; i++ ) {
1516
- var elem = itemElems[i];
1517
- var item = new Item( elem, this );
1518
- items.push( item );
1519
- }
1520
-
1521
- return items;
1522
- };
1523
-
1524
- /**
1525
- * get item elements to be used in layout
1526
- * @param {Array or NodeList or HTMLElement} elems
1527
- * @returns {Array} items - item elements
1528
- */
1529
- proto._filterFindItemElements = function( elems ) {
1530
- return utils.filterFindElements( elems, this.options.itemSelector );
1531
- };
1532
-
1533
- /**
1534
- * getter method for getting item elements
1535
- * @returns {Array} elems - collection of item elements
1536
- */
1537
- proto.getItemElements = function() {
1538
- return this.items.map( function( item ) {
1539
- return item.element;
1540
- });
1541
- };
1542
-
1543
- // ----- init & layout ----- //
1544
-
1545
- /**
1546
- * lays out all items
1547
- */
1548
- proto.layout = function() {
1549
- this._resetLayout();
1550
- this._manageStamps();
1551
-
1552
- // don't animate first layout
1553
- var layoutInstant = this._getOption('layoutInstant');
1554
- var isInstant = layoutInstant !== undefined ?
1555
- layoutInstant : !this._isLayoutInited;
1556
- this.layoutItems( this.items, isInstant );
1557
-
1558
- // flag for initalized
1559
- this._isLayoutInited = true;
1560
- };
1561
-
1562
- // _init is alias for layout
1563
- proto._init = proto.layout;
1564
-
1565
- /**
1566
- * logic before any new layout
1567
- */
1568
- proto._resetLayout = function() {
1569
- this.getSize();
1570
- };
1571
-
1572
-
1573
- proto.getSize = function() {
1574
- this.size = getSize( this.element );
1575
- };
1576
-
1577
- /**
1578
- * get measurement from option, for columnWidth, rowHeight, gutter
1579
- * if option is String -> get element from selector string, & get size of element
1580
- * if option is Element -> get size of element
1581
- * else use option as a number
1582
- *
1583
- * @param {String} measurement
1584
- * @param {String} size - width or height
1585
- * @private
1586
- */
1587
- proto._getMeasurement = function( measurement, size ) {
1588
- var option = this.options[ measurement ];
1589
- var elem;
1590
- if ( !option ) {
1591
- // default to 0
1592
- this[ measurement ] = 0;
1593
- } else {
1594
- // use option as an element
1595
- if ( typeof option == 'string' ) {
1596
- elem = this.element.querySelector( option );
1597
- } else if ( option instanceof HTMLElement ) {
1598
- elem = option;
1599
- }
1600
- // use size of element, if element
1601
- this[ measurement ] = elem ? getSize( elem )[ size ] : option;
1602
- }
1603
- };
1604
-
1605
- /**
1606
- * layout a collection of item elements
1607
- * @api public
1608
- */
1609
- proto.layoutItems = function( items, isInstant ) {
1610
- items = this._getItemsForLayout( items );
1611
-
1612
- this._layoutItems( items, isInstant );
1613
-
1614
- this._postLayout();
1615
- };
1616
-
1617
- /**
1618
- * get the items to be laid out
1619
- * you may want to skip over some items
1620
- * @param {Array} items
1621
- * @returns {Array} items
1622
- */
1623
- proto._getItemsForLayout = function( items ) {
1624
- return items.filter( function( item ) {
1625
- return !item.isIgnored;
1626
- });
1627
- };
1628
-
1629
- /**
1630
- * layout items
1631
- * @param {Array} items
1632
- * @param {Boolean} isInstant
1633
- */
1634
- proto._layoutItems = function( items, isInstant ) {
1635
- this._emitCompleteOnItems( 'layout', items );
1636
-
1637
- if ( !items || !items.length ) {
1638
- // no items, emit event with empty array
1639
- return;
1640
- }
1641
-
1642
- var queue = [];
1643
-
1644
- items.forEach( function( item ) {
1645
- // get x/y object from method
1646
- var position = this._getItemLayoutPosition( item );
1647
- // enqueue
1648
- position.item = item;
1649
- position.isInstant = isInstant || item.isLayoutInstant;
1650
- queue.push( position );
1651
- }, this );
1652
-
1653
- this._processLayoutQueue( queue );
1654
- };
1655
-
1656
- /**
1657
- * get item layout position
1658
- * @param {Outlayer.Item} item
1659
- * @returns {Object} x and y position
1660
- */
1661
- proto._getItemLayoutPosition = function( /* item */ ) {
1662
- return {
1663
- x: 0,
1664
- y: 0
1665
- };
1666
- };
1667
-
1668
- /**
1669
- * iterate over array and position each item
1670
- * Reason being - separating this logic prevents 'layout invalidation'
1671
- * thx @paul_irish
1672
- * @param {Array} queue
1673
- */
1674
- proto._processLayoutQueue = function( queue ) {
1675
- this.updateStagger();
1676
- queue.forEach( function( obj, i ) {
1677
- this._positionItem( obj.item, obj.x, obj.y, obj.isInstant, i );
1678
- }, this );
1679
- };
1680
-
1681
- // set stagger from option in milliseconds number
1682
- proto.updateStagger = function() {
1683
- var stagger = this.options.stagger;
1684
- if ( stagger === null || stagger === undefined ) {
1685
- this.stagger = 0;
1686
- return;
1687
- }
1688
- this.stagger = getMilliseconds( stagger );
1689
- return this.stagger;
1690
- };
1691
-
1692
- /**
1693
- * Sets position of item in DOM
1694
- * @param {Outlayer.Item} item
1695
- * @param {Number} x - horizontal position
1696
- * @param {Number} y - vertical position
1697
- * @param {Boolean} isInstant - disables transitions
1698
- */
1699
- proto._positionItem = function( item, x, y, isInstant, i ) {
1700
- if ( isInstant ) {
1701
- // if not transition, just set CSS
1702
- item.goTo( x, y );
1703
- } else {
1704
- item.stagger( i * this.stagger );
1705
- item.moveTo( x, y );
1706
- }
1707
- };
1708
-
1709
- /**
1710
- * Any logic you want to do after each layout,
1711
- * i.e. size the container
1712
- */
1713
- proto._postLayout = function() {
1714
- this.resizeContainer();
1715
- };
1716
-
1717
- proto.resizeContainer = function() {
1718
- var isResizingContainer = this._getOption('resizeContainer');
1719
- if ( !isResizingContainer ) {
1720
- return;
1721
- }
1722
- var size = this._getContainerSize();
1723
- if ( size ) {
1724
- this._setContainerMeasure( size.width, true );
1725
- this._setContainerMeasure( size.height, false );
1726
- }
1727
- };
1728
-
1729
- /**
1730
- * Sets width or height of container if returned
1731
- * @returns {Object} size
1732
- * @param {Number} width
1733
- * @param {Number} height
1734
- */
1735
- proto._getContainerSize = noop;
1736
-
1737
- /**
1738
- * @param {Number} measure - size of width or height
1739
- * @param {Boolean} isWidth
1740
- */
1741
- proto._setContainerMeasure = function( measure, isWidth ) {
1742
- if ( measure === undefined ) {
1743
- return;
1744
- }
1745
-
1746
- var elemSize = this.size;
1747
- // add padding and border width if border box
1748
- if ( elemSize.isBorderBox ) {
1749
- measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight +
1750
- elemSize.borderLeftWidth + elemSize.borderRightWidth :
1751
- elemSize.paddingBottom + elemSize.paddingTop +
1752
- elemSize.borderTopWidth + elemSize.borderBottomWidth;
1753
- }
1754
-
1755
- measure = Math.max( measure, 0 );
1756
- this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px';
1757
- };
1758
-
1759
- /**
1760
- * emit eventComplete on a collection of items events
1761
- * @param {String} eventName
1762
- * @param {Array} items - Outlayer.Items
1763
- */
1764
- proto._emitCompleteOnItems = function( eventName, items ) {
1765
- var _this = this;
1766
- function onComplete() {
1767
- _this.dispatchEvent( eventName + 'Complete', null, [ items ] );
1768
- }
1769
-
1770
- var count = items.length;
1771
- if ( !items || !count ) {
1772
- onComplete();
1773
- return;
1774
- }
1775
-
1776
- var doneCount = 0;
1777
- function tick() {
1778
- doneCount++;
1779
- if ( doneCount == count ) {
1780
- onComplete();
1781
- }
1782
- }
1783
-
1784
- // bind callback
1785
- items.forEach( function( item ) {
1786
- item.once( eventName, tick );
1787
- });
1788
- };
1789
-
1790
- /**
1791
- * emits events via EvEmitter and jQuery events
1792
- * @param {String} type - name of event
1793
- * @param {Event} event - original event
1794
- * @param {Array} args - extra arguments
1795
- */
1796
- proto.dispatchEvent = function( type, event, args ) {
1797
- // add original event to arguments
1798
- var emitArgs = event ? [ event ].concat( args ) : args;
1799
- this.emitEvent( type, emitArgs );
1800
-
1801
- if ( jQuery ) {
1802
- // set this.$element
1803
- this.$element = this.$element || jQuery( this.element );
1804
- if ( event ) {
1805
- // create jQuery event
1806
- var $event = jQuery.Event( event );
1807
- $event.type = type;
1808
- this.$element.trigger( $event, args );
1809
- } else {
1810
- // just trigger with type if no event available
1811
- this.$element.trigger( type, args );
1812
- }
1813
- }
1814
- };
1815
-
1816
- // -------------------------- ignore & stamps -------------------------- //
1817
-
1818
-
1819
- /**
1820
- * keep item in collection, but do not lay it out
1821
- * ignored items do not get skipped in layout
1822
- * @param {Element} elem
1823
- */
1824
- proto.ignore = function( elem ) {
1825
- var item = this.getItem( elem );
1826
- if ( item ) {
1827
- item.isIgnored = true;
1828
- }
1829
- };
1830
-
1831
- /**
1832
- * return item to layout collection
1833
- * @param {Element} elem
1834
- */
1835
- proto.unignore = function( elem ) {
1836
- var item = this.getItem( elem );
1837
- if ( item ) {
1838
- delete item.isIgnored;
1839
- }
1840
- };
1841
-
1842
- /**
1843
- * adds elements to stamps
1844
- * @param {NodeList, Array, Element, or String} elems
1845
- */
1846
- proto.stamp = function( elems ) {
1847
- elems = this._find( elems );
1848
- if ( !elems ) {
1849
- return;
1850
- }
1851
-
1852
- this.stamps = this.stamps.concat( elems );
1853
- // ignore
1854
- elems.forEach( this.ignore, this );
1855
- };
1856
-
1857
- /**
1858
- * removes elements to stamps
1859
- * @param {NodeList, Array, or Element} elems
1860
- */
1861
- proto.unstamp = function( elems ) {
1862
- elems = this._find( elems );
1863
- if ( !elems ){
1864
- return;
1865
- }
1866
-
1867
- elems.forEach( function( elem ) {
1868
- // filter out removed stamp elements
1869
- utils.removeFrom( this.stamps, elem );
1870
- this.unignore( elem );
1871
- }, this );
1872
- };
1873
-
1874
- /**
1875
- * finds child elements
1876
- * @param {NodeList, Array, Element, or String} elems
1877
- * @returns {Array} elems
1878
- */
1879
- proto._find = function( elems ) {
1880
- if ( !elems ) {
1881
- return;
1882
- }
1883
- // if string, use argument as selector string
1884
- if ( typeof elems == 'string' ) {
1885
- elems = this.element.querySelectorAll( elems );
1886
- }
1887
- elems = utils.makeArray( elems );
1888
- return elems;
1889
- };
1890
-
1891
- proto._manageStamps = function() {
1892
- if ( !this.stamps || !this.stamps.length ) {
1893
- return;
1894
- }
1895
-
1896
- this._getBoundingRect();
1897
-
1898
- this.stamps.forEach( this._manageStamp, this );
1899
- };
1900
-
1901
- // update boundingLeft / Top
1902
- proto._getBoundingRect = function() {
1903
- // get bounding rect for container element
1904
- var boundingRect = this.element.getBoundingClientRect();
1905
- var size = this.size;
1906
- this._boundingRect = {
1907
- left: boundingRect.left + size.paddingLeft + size.borderLeftWidth,
1908
- top: boundingRect.top + size.paddingTop + size.borderTopWidth,
1909
- right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ),
1910
- bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth )
1911
- };
1912
- };
1913
-
1914
- /**
1915
- * @param {Element} stamp
1916
- **/
1917
- proto._manageStamp = noop;
1918
-
1919
- /**
1920
- * get x/y position of element relative to container element
1921
- * @param {Element} elem
1922
- * @returns {Object} offset - has left, top, right, bottom
1923
- */
1924
- proto._getElementOffset = function( elem ) {
1925
- var boundingRect = elem.getBoundingClientRect();
1926
- var thisRect = this._boundingRect;
1927
- var size = getSize( elem );
1928
- var offset = {
1929
- left: boundingRect.left - thisRect.left - size.marginLeft,
1930
- top: boundingRect.top - thisRect.top - size.marginTop,
1931
- right: thisRect.right - boundingRect.right - size.marginRight,
1932
- bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom
1933
- };
1934
- return offset;
1935
- };
1936
-
1937
- // -------------------------- resize -------------------------- //
1938
-
1939
- // enable event handlers for listeners
1940
- // i.e. resize -> onresize
1941
- proto.handleEvent = utils.handleEvent;
1942
-
1943
- /**
1944
- * Bind layout to window resizing
1945
- */
1946
- proto.bindResize = function() {
1947
- window.addEventListener( 'resize', this );
1948
- this.isResizeBound = true;
1949
- };
1950
-
1951
- /**
1952
- * Unbind layout to window resizing
1953
- */
1954
- proto.unbindResize = function() {
1955
- window.removeEventListener( 'resize', this );
1956
- this.isResizeBound = false;
1957
- };
1958
-
1959
- proto.onresize = function() {
1960
- this.resize();
1961
- };
1962
-
1963
- utils.debounceMethod( Outlayer, 'onresize', 100 );
1964
-
1965
- proto.resize = function() {
1966
- // don't trigger if size did not change
1967
- // or if resize was unbound. See #9
1968
- if ( !this.isResizeBound || !this.needsResizeLayout() ) {
1969
- return;
1970
- }
1971
-
1972
- this.layout();
1973
- };
1974
-
1975
- /**
1976
- * check if layout is needed post layout
1977
- * @returns Boolean
1978
- */
1979
- proto.needsResizeLayout = function() {
1980
- var size = getSize( this.element );
1981
- // check that this.size and size are there
1982
- // IE8 triggers resize on body size change, so they might not be
1983
- var hasSizes = this.size && size;
1984
- return hasSizes && size.innerWidth !== this.size.innerWidth;
1985
- };
1986
-
1987
- // -------------------------- methods -------------------------- //
1988
-
1989
- /**
1990
- * add items to Outlayer instance
1991
- * @param {Array or NodeList or Element} elems
1992
- * @returns {Array} items - Outlayer.Items
1993
- **/
1994
- proto.addItems = function( elems ) {
1995
- var items = this._itemize( elems );
1996
- // add items to collection
1997
- if ( items.length ) {
1998
- this.items = this.items.concat( items );
1999
- }
2000
- return items;
2001
- };
2002
-
2003
- /**
2004
- * Layout newly-appended item elements
2005
- * @param {Array or NodeList or Element} elems
2006
- */
2007
- proto.appended = function( elems ) {
2008
- var items = this.addItems( elems );
2009
- if ( !items.length ) {
2010
- return;
2011
- }
2012
- // layout and reveal just the new items
2013
- this.layoutItems( items, true );
2014
- this.reveal( items );
2015
- };
2016
-
2017
- /**
2018
- * Layout prepended elements
2019
- * @param {Array or NodeList or Element} elems
2020
- */
2021
- proto.prepended = function( elems ) {
2022
- var items = this._itemize( elems );
2023
- if ( !items.length ) {
2024
- return;
2025
- }
2026
- // add items to beginning of collection
2027
- var previousItems = this.items.slice(0);
2028
- this.items = items.concat( previousItems );
2029
- // start new layout
2030
- this._resetLayout();
2031
- this._manageStamps();
2032
- // layout new stuff without transition
2033
- this.layoutItems( items, true );
2034
- this.reveal( items );
2035
- // layout previous items
2036
- this.layoutItems( previousItems );
2037
- };
2038
-
2039
- /**
2040
- * reveal a collection of items
2041
- * @param {Array of Outlayer.Items} items
2042
- */
2043
- proto.reveal = function( items ) {
2044
- this._emitCompleteOnItems( 'reveal', items );
2045
- if ( !items || !items.length ) {
2046
- return;
2047
- }
2048
- var stagger = this.updateStagger();
2049
- items.forEach( function( item, i ) {
2050
- item.stagger( i * stagger );
2051
- item.reveal();
2052
- });
2053
- };
2054
-
2055
- /**
2056
- * hide a collection of items
2057
- * @param {Array of Outlayer.Items} items
2058
- */
2059
- proto.hide = function( items ) {
2060
- this._emitCompleteOnItems( 'hide', items );
2061
- if ( !items || !items.length ) {
2062
- return;
2063
- }
2064
- var stagger = this.updateStagger();
2065
- items.forEach( function( item, i ) {
2066
- item.stagger( i * stagger );
2067
- item.hide();
2068
- });
2069
- };
2070
-
2071
- /**
2072
- * reveal item elements
2073
- * @param {Array}, {Element}, {NodeList} items
2074
- */
2075
- proto.revealItemElements = function( elems ) {
2076
- var items = this.getItems( elems );
2077
- this.reveal( items );
2078
- };
2079
-
2080
- /**
2081
- * hide item elements
2082
- * @param {Array}, {Element}, {NodeList} items
2083
- */
2084
- proto.hideItemElements = function( elems ) {
2085
- var items = this.getItems( elems );
2086
- this.hide( items );
2087
- };
2088
-
2089
- /**
2090
- * get Outlayer.Item, given an Element
2091
- * @param {Element} elem
2092
- * @param {Function} callback
2093
- * @returns {Outlayer.Item} item
2094
- */
2095
- proto.getItem = function( elem ) {
2096
- // loop through items to get the one that matches
2097
- for ( var i=0; i < this.items.length; i++ ) {
2098
- var item = this.items[i];
2099
- if ( item.element == elem ) {
2100
- // return item
2101
- return item;
2102
- }
2103
- }
2104
- };
2105
-
2106
- /**
2107
- * get collection of Outlayer.Items, given Elements
2108
- * @param {Array} elems
2109
- * @returns {Array} items - Outlayer.Items
2110
- */
2111
- proto.getItems = function( elems ) {
2112
- elems = utils.makeArray( elems );
2113
- var items = [];
2114
- elems.forEach( function( elem ) {
2115
- var item = this.getItem( elem );
2116
- if ( item ) {
2117
- items.push( item );
2118
- }
2119
- }, this );
2120
-
2121
- return items;
2122
- };
2123
-
2124
- /**
2125
- * remove element(s) from instance and DOM
2126
- * @param {Array or NodeList or Element} elems
2127
- */
2128
- proto.remove = function( elems ) {
2129
- var removeItems = this.getItems( elems );
2130
-
2131
- this._emitCompleteOnItems( 'remove', removeItems );
2132
-
2133
- // bail if no items to remove
2134
- if ( !removeItems || !removeItems.length ) {
2135
- return;
2136
- }
2137
-
2138
- removeItems.forEach( function( item ) {
2139
- item.remove();
2140
- // remove item from collection
2141
- utils.removeFrom( this.items, item );
2142
- }, this );
2143
- };
2144
-
2145
- // ----- destroy ----- //
2146
-
2147
- // remove and disable Outlayer instance
2148
- proto.destroy = function() {
2149
- // clean up dynamic styles
2150
- var style = this.element.style;
2151
- style.height = '';
2152
- style.position = '';
2153
- style.width = '';
2154
- // destroy items
2155
- this.items.forEach( function( item ) {
2156
- item.destroy();
2157
- });
2158
-
2159
- this.unbindResize();
2160
-
2161
- var id = this.element.outlayerGUID;
2162
- delete instances[ id ]; // remove reference to instance by id
2163
- delete this.element.outlayerGUID;
2164
- // remove data for jQuery
2165
- if ( jQuery ) {
2166
- jQuery.removeData( this.element, this.constructor.namespace );
2167
- }
2168
-
2169
- };
2170
-
2171
- // -------------------------- data -------------------------- //
2172
-
2173
- /**
2174
- * get Outlayer instance from element
2175
- * @param {Element} elem
2176
- * @returns {Outlayer}
2177
- */
2178
- Outlayer.data = function( elem ) {
2179
- elem = utils.getQueryElement( elem );
2180
- var id = elem && elem.outlayerGUID;
2181
- return id && instances[ id ];
2182
- };
2183
-
2184
-
2185
- // -------------------------- create Outlayer class -------------------------- //
2186
-
2187
- /**
2188
- * create a layout class
2189
- * @param {String} namespace
2190
- */
2191
- Outlayer.create = function( namespace, options ) {
2192
- // sub-class Outlayer
2193
- var Layout = subclass( Outlayer );
2194
- // apply new options and compatOptions
2195
- Layout.defaults = utils.extend( {}, Outlayer.defaults );
2196
- utils.extend( Layout.defaults, options );
2197
- Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions );
2198
-
2199
- Layout.namespace = namespace;
2200
-
2201
- Layout.data = Outlayer.data;
2202
-
2203
- // sub-class Item
2204
- Layout.Item = subclass( Item );
2205
-
2206
- // -------------------------- declarative -------------------------- //
2207
-
2208
- utils.htmlInit( Layout, namespace );
2209
-
2210
- // -------------------------- jQuery bridge -------------------------- //
2211
-
2212
- // make into jQuery plugin
2213
- if ( jQuery && jQuery.bridget ) {
2214
- jQuery.bridget( namespace, Layout );
2215
- }
2216
-
2217
- return Layout;
2218
- };
2219
-
2220
- function subclass( Parent ) {
2221
- function SubClass() {
2222
- Parent.apply( this, arguments );
2223
- }
2224
-
2225
- SubClass.prototype = Object.create( Parent.prototype );
2226
- SubClass.prototype.constructor = SubClass;
2227
-
2228
- return SubClass;
2229
- }
2230
-
2231
- // ----- helpers ----- //
2232
-
2233
- // how many milliseconds are in each unit
2234
- var msUnits = {
2235
- ms: 1,
2236
- s: 1000
2237
- };
2238
-
2239
- // munge time-like parameter into millisecond number
2240
- // '0.4s' -> 40
2241
- function getMilliseconds( time ) {
2242
- if ( typeof time == 'number' ) {
2243
- return time;
2244
- }
2245
- var matches = time.match( /(^\d*\.?\d*)(\w*)/ );
2246
- var num = matches && matches[1];
2247
- var unit = matches && matches[2];
2248
- if ( !num.length ) {
2249
- return 0;
2250
- }
2251
- num = parseFloat( num );
2252
- var mult = msUnits[ unit ] || 1;
2253
- return num * mult;
2254
- }
2255
-
2256
- // ----- fin ----- //
2257
-
2258
- // back in global
2259
- Outlayer.Item = Item;
2260
-
2261
- return Outlayer;
2262
-
2263
- }));
2264
-
2265
- /*!
2266
- * Masonry v4.2.2
2267
- * Cascading grid layout library
2268
- * https://masonry.desandro.com
2269
- * MIT License
2270
- * by David DeSandro
2271
- */
2272
-
2273
- ( function( window, factory ) {
2274
- // universal module definition
2275
- /* jshint strict: false */ /*globals define, module, require */
2276
- if ( typeof define == 'function' && define.amd ) {
2277
- // AMD
2278
- define( [
2279
- 'outlayer/outlayer',
2280
- 'get-size/get-size'
2281
- ],
2282
- factory );
2283
- } else if ( typeof module == 'object' && module.exports ) {
2284
- // CommonJS
2285
- module.exports = factory(
2286
- require('outlayer'),
2287
- require('get-size')
2288
- );
2289
- } else {
2290
- // browser global
2291
- window.Masonry = factory(
2292
- window.Outlayer,
2293
- window.getSize
2294
- );
2295
- }
2296
-
2297
- }( window, function factory( Outlayer, getSize ) {
2298
-
2299
-
2300
-
2301
- // -------------------------- masonryDefinition -------------------------- //
2302
-
2303
- // create an Outlayer layout class
2304
- var Masonry = Outlayer.create('masonry');
2305
- // isFitWidth -> fitWidth
2306
- Masonry.compatOptions.fitWidth = 'isFitWidth';
2307
-
2308
- var proto = Masonry.prototype;
2309
-
2310
- proto._resetLayout = function() {
2311
- this.getSize();
2312
- this._getMeasurement( 'columnWidth', 'outerWidth' );
2313
- this._getMeasurement( 'gutter', 'outerWidth' );
2314
- this.measureColumns();
2315
-
2316
- // reset column Y
2317
- this.colYs = [];
2318
- for ( var i=0; i < this.cols; i++ ) {
2319
- this.colYs.push( 0 );
2320
- }
2321
-
2322
- this.maxY = 0;
2323
- this.horizontalColIndex = 0;
2324
- };
2325
-
2326
- proto.measureColumns = function() {
2327
- this.getContainerWidth();
2328
- // if columnWidth is 0, default to outerWidth of first item
2329
- if ( !this.columnWidth ) {
2330
- var firstItem = this.items[0];
2331
- var firstItemElem = firstItem && firstItem.element;
2332
- // columnWidth fall back to item of first element
2333
- this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||
2334
- // if first elem has no width, default to size of container
2335
- this.containerWidth;
2336
- }
2337
-
2338
- var columnWidth = this.columnWidth += this.gutter;
2339
-
2340
- // calculate columns
2341
- var containerWidth = this.containerWidth + this.gutter;
2342
- var cols = containerWidth / columnWidth;
2343
- // fix rounding errors, typically with gutters
2344
- var excess = columnWidth - containerWidth % columnWidth;
2345
- // if overshoot is less than a pixel, round up, otherwise floor it
2346
- var mathMethod = excess && excess < 1 ? 'round' : 'floor';
2347
- cols = Math[ mathMethod ]( cols );
2348
- this.cols = Math.max( cols, 1 );
2349
- };
2350
-
2351
- proto.getContainerWidth = function() {
2352
- // container is parent if fit width
2353
- var isFitWidth = this._getOption('fitWidth');
2354
- var container = isFitWidth ? this.element.parentNode : this.element;
2355
- // check that this.size and size are there
2356
- // IE8 triggers resize on body size change, so they might not be
2357
- var size = getSize( container );
2358
- this.containerWidth = size && size.innerWidth;
2359
- };
2360
-
2361
- proto._getItemLayoutPosition = function( item ) {
2362
- item.getSize();
2363
- // how many columns does this brick span
2364
- var remainder = item.size.outerWidth % this.columnWidth;
2365
- var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';
2366
- // round if off by 1 pixel, otherwise use ceil
2367
- var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );
2368
- colSpan = Math.min( colSpan, this.cols );
2369
- // use horizontal or top column position
2370
- var colPosMethod = this.options.horizontalOrder ?
2371
- '_getHorizontalColPosition' : '_getTopColPosition';
2372
- var colPosition = this[ colPosMethod ]( colSpan, item );
2373
- // position the brick
2374
- var position = {
2375
- x: this.columnWidth * colPosition.col,
2376
- y: colPosition.y
2377
- };
2378
- // apply setHeight to necessary columns
2379
- var setHeight = colPosition.y + item.size.outerHeight;
2380
- var setMax = colSpan + colPosition.col;
2381
- for ( var i = colPosition.col; i < setMax; i++ ) {
2382
- this.colYs[i] = setHeight;
2383
- }
2384
-
2385
- return position;
2386
- };
2387
-
2388
- proto._getTopColPosition = function( colSpan ) {
2389
- var colGroup = this._getTopColGroup( colSpan );
2390
- // get the minimum Y value from the columns
2391
- var minimumY = Math.min.apply( Math, colGroup );
2392
-
2393
- return {
2394
- col: colGroup.indexOf( minimumY ),
2395
- y: minimumY,
2396
- };
2397
- };
2398
-
2399
- /**
2400
- * @param {Number} colSpan - number of columns the element spans
2401
- * @returns {Array} colGroup
2402
- */
2403
- proto._getTopColGroup = function( colSpan ) {
2404
- if ( colSpan < 2 ) {
2405
- // if brick spans only one column, use all the column Ys
2406
- return this.colYs;
2407
- }
2408
-
2409
- var colGroup = [];
2410
- // how many different places could this brick fit horizontally
2411
- var groupCount = this.cols + 1 - colSpan;
2412
- // for each group potential horizontal position
2413
- for ( var i = 0; i < groupCount; i++ ) {
2414
- colGroup[i] = this._getColGroupY( i, colSpan );
2415
- }
2416
- return colGroup;
2417
- };
2418
-
2419
- proto._getColGroupY = function( col, colSpan ) {
2420
- if ( colSpan < 2 ) {
2421
- return this.colYs[ col ];
2422
- }
2423
- // make an array of colY values for that one group
2424
- var groupColYs = this.colYs.slice( col, col + colSpan );
2425
- // and get the max value of the array
2426
- return Math.max.apply( Math, groupColYs );
2427
- };
2428
-
2429
- // get column position based on horizontal index. #873
2430
- proto._getHorizontalColPosition = function( colSpan, item ) {
2431
- var col = this.horizontalColIndex % this.cols;
2432
- var isOver = colSpan > 1 && col + colSpan > this.cols;
2433
- // shift to next row if item can't fit on current row
2434
- col = isOver ? 0 : col;
2435
- // don't let zero-size items take up space
2436
- var hasSize = item.size.outerWidth && item.size.outerHeight;
2437
- this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex;
2438
-
2439
- return {
2440
- col: col,
2441
- y: this._getColGroupY( col, colSpan ),
2442
- };
2443
- };
2444
-
2445
- proto._manageStamp = function( stamp ) {
2446
- var stampSize = getSize( stamp );
2447
- var offset = this._getElementOffset( stamp );
2448
- // get the columns that this stamp affects
2449
- var isOriginLeft = this._getOption('originLeft');
2450
- var firstX = isOriginLeft ? offset.left : offset.right;
2451
- var lastX = firstX + stampSize.outerWidth;
2452
- var firstCol = Math.floor( firstX / this.columnWidth );
2453
- firstCol = Math.max( 0, firstCol );
2454
- var lastCol = Math.floor( lastX / this.columnWidth );
2455
- // lastCol should not go over if multiple of columnWidth #425
2456
- lastCol -= lastX % this.columnWidth ? 0 : 1;
2457
- lastCol = Math.min( this.cols - 1, lastCol );
2458
- // set colYs to bottom of the stamp
2459
-
2460
- var isOriginTop = this._getOption('originTop');
2461
- var stampMaxY = ( isOriginTop ? offset.top : offset.bottom ) +
2462
- stampSize.outerHeight;
2463
- for ( var i = firstCol; i <= lastCol; i++ ) {
2464
- this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );
2465
- }
2466
- };
2467
-
2468
- proto._getContainerSize = function() {
2469
- this.maxY = Math.max.apply( Math, this.colYs );
2470
- var size = {
2471
- height: this.maxY
2472
- };
2473
-
2474
- if ( this._getOption('fitWidth') ) {
2475
- size.width = this._getContainerFitWidth();
2476
- }
2477
-
2478
- return size;
2479
- };
2480
-
2481
- proto._getContainerFitWidth = function() {
2482
- var unusedCols = 0;
2483
- // count unused columns
2484
- var i = this.cols;
2485
- while ( --i ) {
2486
- if ( this.colYs[i] !== 0 ) {
2487
- break;
2488
- }
2489
- unusedCols++;
2490
- }
2491
- // fit container to columns that have been used
2492
- return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;
2493
- };
2494
-
2495
- proto.needsResizeLayout = function() {
2496
- var previousWidth = this.containerWidth;
2497
- this.getContainerWidth();
2498
- return previousWidth != this.containerWidth;
2499
- };
2500
-
2501
- return Masonry;
2502
-
2503
- }));
2504
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/masonry/masonry.min.js DELETED
@@ -1,9 +0,0 @@
1
- /*!
2
- * Masonry PACKAGED v4.2.2
3
- * Cascading grid layout library
4
- * https://masonry.desandro.com
5
- * MIT License
6
- * by David DeSandro
7
- */
8
-
9
- !function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(t,r),delete n[r]),r.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);s=200==Math.round(t(o.width)),r.isBoxSizeOuter=s,i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var n=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?n.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,n){t=i.makeArray(t);var o=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!n)return void o.push(t);e(t,n)&&o.push(t);for(var i=t.querySelectorAll(n),r=0;r<i.length;r++)o.push(i[r])}}),o},i.debounceMethod=function(t,e,i){i=i||100;var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var o=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var r=i.toDashed(n),s="data-"+r,a=document.querySelectorAll("["+s+"]"),h=document.querySelectorAll(".js-"+r),u=i.makeArray(a).concat(i.makeArray(h)),d=s+"-options",l=t.jQuery;u.forEach(function(t){var i,r=t.getAttribute(s)||t.getAttribute(d);try{i=r&&JSON.parse(r)}catch(a){return void(o&&o.error("Error parsing "+s+" on "+t.className+": "+a))}var h=new e(t,i);l&&l.data(t,n,h)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function n(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var r=document.documentElement.style,s="string"==typeof r.transition?"transition":"WebkitTransition",a="string"==typeof r.transform?"transform":"WebkitTransform",h={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[s],u={transform:a,transition:s,transitionDuration:s+"Duration",transitionProperty:s+"Property",transitionDelay:s+"Delay"},d=n.prototype=Object.create(t.prototype);d.constructor=n,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var n=u[i]||i;e[n]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],r=parseFloat(n),s=parseFloat(o),a=this.layout.size;-1!=n.indexOf("%")&&(r=r/100*a.width),-1!=o.indexOf("%")&&(s=s/100*a.height),r=isNaN(r)?0:r,s=isNaN(s)?0:s,r-=e?a.paddingLeft:a.paddingRight,s-=i?a.paddingTop:a.paddingBottom,this.position.x=r,this.position.y=s},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",r=i?"left":"right",s=i?"right":"left",a=this.position.x+t[o];e[r]=this.getXValue(a),e[s]="";var h=n?"paddingTop":"paddingBottom",u=n?"top":"bottom",d=n?"bottom":"top",l=this.position.y+t[h];e[u]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),o&&!this.isTransitioning)return void this.layoutPosition();var r=t-i,s=e-n,a={};a.transform=this.getTranslate(r,s),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop");return t=i?t:-t,e=n?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var n=this.element.offsetHeight;n=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+o(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(h,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var c={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=c[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var o=e.onEnd[n];o.call(this),delete e.onEnd[n]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(h,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(f)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return s&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},n}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,o){"use strict";function r(t,e){var i=n.getQueryElement(t);if(!i)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,u&&(this.$element=u(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var o=++l;this.element.outlayerGUID=o,c[o]=this,this._create();var r=this._getOption("initLayout");r&&this.layout()}function s(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var o=m[n]||1;return i*o}var h=t.console,u=t.jQuery,d=function(){},l=0,c={};r.namespace="outlayer",r.Item=o,r.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=r.prototype;n.extend(f,e.prototype),f.option=function(t){n.extend(this.options,t)},f._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},r.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var r=e[o],s=new i(r,this);n.push(s)}return n},f._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},f.getItemElements=function(){return this.items.map(function(t){return t.element})},f.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},f._init=f.layout,f._resetLayout=function(){this.getSize()},f.getSize=function(){this.size=i(this.element)},f._getMeasurement=function(t,e){var n,o=this.options[t];o?("string"==typeof o?n=this.element.querySelector(o):o instanceof HTMLElement&&(n=o),this[t]=n?i(n)[e]:o):this[t]=0},f.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},f._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},f._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},f._getItemLayoutPosition=function(){return{x:0,y:0}},f._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},f.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},f._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},f._postLayout=function(){this.resizeContainer()},f.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},f._getContainerSize=d,f._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},f._emitCompleteOnItems=function(t,e){function i(){o.dispatchEvent(t+"Complete",null,[e])}function n(){s++,s==r&&i()}var o=this,r=e.length;if(!e||!r)return void i();var s=0;e.forEach(function(e){e.once(t,n)})},f.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),u)if(this.$element=this.$element||u(this.element),e){var o=u.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},f.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},f.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},f.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},f.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},f._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)):void 0},f._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},f._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},f._manageStamp=d,f._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,o=i(t),r={left:e.left-n.left-o.marginLeft,top:e.top-n.top-o.marginTop,right:n.right-e.right-o.marginRight,bottom:n.bottom-e.bottom-o.marginBottom};return r},f.handleEvent=n.handleEvent,f.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},f.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},f.onresize=function(){this.resize()},n.debounceMethod(r,"onresize",100),f.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},f.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},f.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},f.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},f.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},f.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},f.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},f.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},f.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},f.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},f.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},f.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},f.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete c[e],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},r.data=function(t){t=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&c[e]},r.create=function(t,e){var i=s(r);return i.defaults=n.extend({},r.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},r.compatOptions),i.namespace=t,i.data=r.data,i.Item=s(o),n.htmlInit(i,t),u&&u.bridget&&u.bridget(t,i),i};var m={ms:1,s:1e3};return r.Item=o,r}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var n=i.prototype;return n._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},n.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/n,s=n-o%n,a=s&&1>s?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});
 
 
 
 
 
 
 
 
 
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 7.4.03
6
  *
7
  */
8
 
@@ -384,7 +384,7 @@ global $wppa_opt;
384
  break;
385
 
386
  case 'update-photo-new': // Do the actual edit update
387
- wppa_log('obs', 'POST args are: '.wppa_compress_html(var_export(array_keys($_POST),true)));
388
  // Get photo id
389
  $photo = wppa_decrypt_photo( $_REQUEST['photo-id'], false, true );
390
  $photo = strval( intval( $photo ) );
@@ -2751,12 +2751,24 @@ wppa_log('obs', 'POST args are: '.wppa_compress_html(var_export(array_keys($_POS
2751
  'wppa_potd_photo',
2752
  );
2753
 
 
 
 
 
 
 
2754
  if ( in_array( $option, $potdarr ) ) {
2755
  if ( ! current_user_can( 'wppa_potd' ) ) {
2756
  echo '||1||'.__( 'You do not have the rights to update photo of the day settings' , 'wp-photo-album-plus');
2757
  wppa_exit();
2758
  }
2759
  }
 
 
 
 
 
 
2760
  else {
2761
  if ( ! current_user_can( 'wppa_settings' ) ) {
2762
  echo '||1||'.__( 'You do not have the rights to update settings' , 'wp-photo-album-plus');
@@ -3482,6 +3494,7 @@ wppa_log('obs', 'POST args are: '.wppa_compress_html(var_export(array_keys($_POS
3482
  case 'wppa_search_tags':
3483
  case 'wppa_search_cats':
3484
  case 'wppa_search_comments':
 
3485
  $wpdb->query( "UPDATE $wpdb->wppa_photos SET indexdtm = ''" );
3486
  wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
3487
  $wpdb->query( "UPDATE $wpdb->wppa_albums SET indexdtm = ''" );
@@ -3627,16 +3640,13 @@ wppa_log('obs', 'POST args are: '.wppa_compress_html(var_export(array_keys($_POS
3627
  case 'wppa_pl_dirname':
3628
  $value = wppa_sanitize_file_name( $value );
3629
  $value = trim( $value, ' /' );
 
3630
  // Remove old file if it exists
3631
  $oldfile = WPPA_CONTENT_PATH . '/' . wppa_get_option( 'wppa_pl_dirname' ) . '/.htaccess';
3632
  if ( wppa_is_file( $oldfile ) ) {
3633
- if ( ! wppa_unlink( $oldfile ) ) {
3634
- // wppa_log('obs', 'Could not remove: '.$oldfile);
3635
- }
3636
- }
3637
- else {
3638
- // wppa_log('obs', 'Does not exist: '.$oldfile);
3639
  }
 
3640
  if ( $value ) {
3641
  wppa_create_pl_htaccess( $value );
3642
  }
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 7.5.03
6
  *
7
  */
8
 
384
  break;
385
 
386
  case 'update-photo-new': // Do the actual edit update
387
+
388
  // Get photo id
389
  $photo = wppa_decrypt_photo( $_REQUEST['photo-id'], false, true );
390
  $photo = strval( intval( $photo ) );
2751
  'wppa_potd_photo',
2752
  );
2753
 
2754
+ // Settings for edit photo tag
2755
+ $edit_tag_arr = array( 'wppa_tag_to_edit',
2756
+ 'wppa_new_tag_value',
2757
+ 'wppa_edit_tag',
2758
+ );
2759
+
2760
  if ( in_array( $option, $potdarr ) ) {
2761
  if ( ! current_user_can( 'wppa_potd' ) ) {
2762
  echo '||1||'.__( 'You do not have the rights to update photo of the day settings' , 'wp-photo-album-plus');
2763
  wppa_exit();
2764
  }
2765
  }
2766
+ elseif ( in_array( $option, $edit_tag_arr ) ) {
2767
+ if ( ! current_user_can( 'wppa_settings' ) && ! current_user_can( 'wppa_edit_tags' ) ) {
2768
+ echo '||1||'.__( 'You do not have the rights to update settings' , 'wp-photo-album-plus') . ' (et)';
2769
+ wppa_exit();
2770
+ }
2771
+ }
2772
  else {
2773
  if ( ! current_user_can( 'wppa_settings' ) ) {
2774
  echo '||1||'.__( 'You do not have the rights to update settings' , 'wp-photo-album-plus');
3494
  case 'wppa_search_tags':
3495
  case 'wppa_search_cats':
3496
  case 'wppa_search_comments':
3497
+ wppa_clear_taglist();
3498
  $wpdb->query( "UPDATE $wpdb->wppa_photos SET indexdtm = ''" );
3499
  wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
3500
  $wpdb->query( "UPDATE $wpdb->wppa_albums SET indexdtm = ''" );
3640
  case 'wppa_pl_dirname':
3641
  $value = wppa_sanitize_file_name( $value );
3642
  $value = trim( $value, ' /' );
3643
+
3644
  // Remove old file if it exists
3645
  $oldfile = WPPA_CONTENT_PATH . '/' . wppa_get_option( 'wppa_pl_dirname' ) . '/.htaccess';
3646
  if ( wppa_is_file( $oldfile ) ) {
3647
+ wppa_unlink( $oldfile );
 
 
 
 
 
3648
  }
3649
+
3650
  if ( $value ) {
3651
  wppa_create_pl_htaccess( $value );
3652
  }
wppa-album-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
- * Version 7.5.01
7
  *
8
  */
9
 
@@ -554,48 +554,50 @@ global $wppa_revno;
554
  echo '&nbsp;';
555
 
556
  // P-order-by
557
- echo
558
- __( 'Photo order:', 'wp-photo-album-plus' ) . ' ';
559
- $options = array( __( '--- default --- See Table IV-C1', 'wp-photo-album-plus' ),
560
- __( 'Order #', 'wp-photo-album-plus' ),
561
- __( 'Name', 'wp-photo-album-plus' ),
562
- __( 'Random', 'wp-photo-album-plus' ),
563
- __( 'Rating mean value', 'wp-photo-album-plus' ),
564
- __( 'Number of votes', 'wp-photo-album-plus' ),
565
- __( 'Timestamp', 'wp-photo-album-plus' ),
566
- __( 'EXIF Date', 'wp-photo-album-plus' ),
567
- __( 'Order # desc', 'wp-photo-album-plus' ),
568
- __( 'Name desc', 'wp-photo-album-plus' ),
569
- __( 'Rating mean value desc', 'wp-photo-album-plus' ),
570
- __( 'Number of votes desc', 'wp-photo-album-plus' ),
571
- __( 'Timestamp desc', 'wp-photo-album-plus' ),
572
- __( 'EXIF Date desc', 'wp-photo-album-plus' )
573
- );
574
- $values = array( '0',
575
- '1',
576
- '2',
577
- '3',
578
- '4',
579
- '6',
580
- '5',
581
- '7',
582
- '-1',
583
- '-2',
584
- '-4',
585
- '-6',
586
- '-5',
587
- '-7'
588
- );
589
- echo '
590
- <select
591
- onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'p_order_by\', this )"
592
- >';
593
- foreach ( array_keys( $options ) as $key ) {
594
- $sel = $values[$key] == $p_order_by ? ' selected="selected"' : '';
595
- echo '<option value="' . $values[$key] . '"' . $sel . ' >' . $options[$key] . '</option>';
596
- }
597
- echo '
598
- </select>&nbsp;';
 
 
599
 
600
  // Child album order
601
  $sel = ' selected="selected"';
@@ -1697,7 +1699,7 @@ global $wpdb;
1697
  <td ><?php _e('Edit', 'wp-photo-album-plus'); ?></td>
1698
  <td ><?php _e('Quick', 'wp-photo-album-plus'); ?></td>
1699
  <td ><?php _e('Bulk', 'wp-photo-album-plus'); ?></td>
1700
- <td ><?php _e('Seq', 'wp-photo-album-plus'); ?></td>
1701
  <td ><?php _e('CovImg', 'wp-photo-album-plus'); ?></td>
1702
  <?php
1703
  if ( current_user_can( 'wppa_upload' ) ) {
@@ -1719,7 +1721,7 @@ global $wpdb;
1719
  foreach ( array_keys( $seq ) as $s ) {
1720
  $album = $albums[$s];
1721
 
1722
- if ( wppa_have_access( $album ) && ( wppa_user_is( 'administrator' ) || $album['owner'] != '--- public ---' ) ) {
1723
  $counts = wppa_get_treecounts_a($album['id'], true);
1724
  $pendcount = $counts['pendselfphotos'];
1725
  // $pendcount = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM $wpdb->wppa_photos WHERE album=%s AND status=%s", $album['id'], 'pending'));
@@ -1744,7 +1746,16 @@ global $wpdb;
1744
  <td><a href="<?php echo($url) ?>" class="wppaedit"><?php _e('Edit', 'wp-photo-album-plus'); ?></a></td>
1745
  <td><a href="<?php echo($url.'&amp;quick') ?>" class="wppaedit"><?php _e('Quick', 'wp-photo-album-plus'); ?></a></td>
1746
  <td><a href="<?php echo($url.'&amp;bulk#manage-photos') ?>" class="wppaedit"><?php _e('Bulk', 'wp-photo-album-plus'); ?></a></td>
1747
- <td><a href="<?php echo($url.'&amp;seq') ?>" class="wppaedit"><?php _e('Seq', 'wp-photo-album-plus'); ?></a></td>
 
 
 
 
 
 
 
 
 
1748
  <?php
1749
  $covid = max( $album['main_photo'], '0' );
1750
  if ( $covid ) {
@@ -1860,7 +1871,7 @@ global $wpdb;
1860
  <td ><?php _e('Edit', 'wp-photo-album-plus'); ?></td>
1861
  <td ><?php _e('Quick', 'wp-photo-album-plus'); ?></td>
1862
  <td ><?php _e('Bulk', 'wp-photo-album-plus'); ?></td>
1863
- <td ><?php _e('Seq', 'wp-photo-album-plus'); ?></td>
1864
  <td ><?php _e('CovImg', 'wp-photo-album-plus'); ?></td>
1865
  <?php
1866
  if ( current_user_can( 'wppa_upload' ) ) {
@@ -2159,7 +2170,7 @@ global $wpdb;
2159
  <td ><?php _e('Edit', 'wp-photo-album-plus'); ?></td>
2160
  <td ><?php _e('Quick', 'wp-photo-album-plus'); ?></td>
2161
  <td ><?php _e('Bulk', 'wp-photo-album-plus'); ?></td>
2162
- <td ><?php _e('Seq', 'wp-photo-album-plus'); ?></td>
2163
  <td ><?php _e('CovImg', 'wp-photo-album-plus'); ?></td>
2164
  <?php
2165
  if ( current_user_can( 'wppa_upload' ) ) {
@@ -2270,7 +2281,7 @@ global $wpdb;
2270
  <td ><?php _e('Edit', 'wp-photo-album-plus'); ?></td>
2271
  <td ><?php _e('Quick', 'wp-photo-album-plus'); ?></td>
2272
  <td ><?php _e('Bulk', 'wp-photo-album-plus'); ?></td>
2273
- <td ><?php _e('Seq', 'wp-photo-album-plus'); ?></td>
2274
  <td ><?php _e('CovImg', 'wp-photo-album-plus'); ?></td>
2275
  <?php
2276
  if ( current_user_can( 'wppa_upload' ) ) {
@@ -2613,12 +2624,21 @@ global $wpdb;
2613
  <?php $ns = $counts['scheduledselfphotos']; ?>
2614
  <td><?php echo $na.'/'.$np.'/'.$nm.'/'.$ns; ?></td>
2615
 
2616
- <?php if ( $album['owner'] == wppa_get_user() || wppa_user_is('administrator') ) { ?>
2617
  <?php $url = wppa_ea_url($id) ?>
2618
  <td><a href="<?php echo($url) ?>" class="wppaedit"><?php _e('Edit', 'wp-photo-album-plus'); ?></a></td>
2619
  <td><a href="<?php echo($url.'&amp;quick') ?>" class="wppaedit"><?php _e('Quick', 'wp-photo-album-plus'); ?></a></td>
2620
  <td><a href="<?php echo($url.'&amp;bulk#manage-photos') ?>" class="wppaedit"><?php _e('Bulk', 'wp-photo-album-plus'); ?></a></td>
2621
- <td><a href="<?php echo($url.'&amp;seq') ?>" class="wppaedit"><?php _e('Seq', 'wp-photo-album-plus'); ?></a></td>
 
 
 
 
 
 
 
 
 
2622
  <?php
2623
  $covid = max( $album['main_photo'], '0' );
2624
  if ( $covid ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
+ * Version 7.5.03
7
  *
8
  */
9
 
554
  echo '&nbsp;';
555
 
556
  // P-order-by
557
+ if ( ! wppa_switch( 'porder_restricted' ) || wppa_user_is( 'administrator' ) ) {
558
+ echo
559
+ __( 'Photo order:', 'wp-photo-album-plus' ) . ' ';
560
+ $options = array( __( '--- default --- See Table IV-C1', 'wp-photo-album-plus' ),
561
+ __( 'Order #', 'wp-photo-album-plus' ),
562
+ __( 'Name', 'wp-photo-album-plus' ),
563
+ __( 'Random', 'wp-photo-album-plus' ),
564
+ __( 'Rating mean value', 'wp-photo-album-plus' ),
565
+ __( 'Number of votes', 'wp-photo-album-plus' ),
566
+ __( 'Timestamp', 'wp-photo-album-plus' ),
567
+ __( 'EXIF Date', 'wp-photo-album-plus' ),
568
+ __( 'Order # desc', 'wp-photo-album-plus' ),
569
+ __( 'Name desc', 'wp-photo-album-plus' ),
570
+ __( 'Rating mean value desc', 'wp-photo-album-plus' ),
571
+ __( 'Number of votes desc', 'wp-photo-album-plus' ),
572
+ __( 'Timestamp desc', 'wp-photo-album-plus' ),
573
+ __( 'EXIF Date desc', 'wp-photo-album-plus' )
574
+ );
575
+ $values = array( '0',
576
+ '1',
577
+ '2',
578
+ '3',
579
+ '4',
580
+ '6',
581
+ '5',
582
+ '7',
583
+ '-1',
584
+ '-2',
585
+ '-4',
586
+ '-6',
587
+ '-5',
588
+ '-7'
589
+ );
590
+ echo '
591
+ <select
592
+ onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'p_order_by\', this )"
593
+ >';
594
+ foreach ( array_keys( $options ) as $key ) {
595
+ $sel = $values[$key] == $p_order_by ? ' selected="selected"' : '';
596
+ echo '<option value="' . $values[$key] . '"' . $sel . ' >' . $options[$key] . '</option>';
597
+ }
598
+ echo '
599
+ </select>&nbsp;';
600
+ }
601
 
602
  // Child album order
603
  $sel = ' selected="selected"';
1699
  <td ><?php _e('Edit', 'wp-photo-album-plus'); ?></td>
1700
  <td ><?php _e('Quick', 'wp-photo-album-plus'); ?></td>
1701
  <td ><?php _e('Bulk', 'wp-photo-album-plus'); ?></td>
1702
+ <td ><?php echo ( ! wppa_switch( 'porder_restricted' ) || wppa_user_is( 'administrator' ) ? __('Seq', 'wp-photo-album-plus') : '' ) ?></td>
1703
  <td ><?php _e('CovImg', 'wp-photo-album-plus'); ?></td>
1704
  <?php
1705
  if ( current_user_can( 'wppa_upload' ) ) {
1721
  foreach ( array_keys( $seq ) as $s ) {
1722
  $album = $albums[$s];
1723
 
1724
+ if ( wppa_have_access( $album ) ) { // && ( wppa_user_is( 'administrator' ) || $album['owner'] != '--- public ---' ) ) {
1725
  $counts = wppa_get_treecounts_a($album['id'], true);
1726
  $pendcount = $counts['pendselfphotos'];
1727
  // $pendcount = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM $wpdb->wppa_photos WHERE album=%s AND status=%s", $album['id'], 'pending'));
1746
  <td><a href="<?php echo($url) ?>" class="wppaedit"><?php _e('Edit', 'wp-photo-album-plus'); ?></a></td>
1747
  <td><a href="<?php echo($url.'&amp;quick') ?>" class="wppaedit"><?php _e('Quick', 'wp-photo-album-plus'); ?></a></td>
1748
  <td><a href="<?php echo($url.'&amp;bulk#manage-photos') ?>" class="wppaedit"><?php _e('Bulk', 'wp-photo-album-plus'); ?></a></td>
1749
+
1750
+ <?php if ( ! wppa_switch( 'porder_restricted' ) || wppa_user_is( 'administrator' ) ) {
1751
+ ?>
1752
+ <td><a href="<?php echo($url.'&amp;seq') ?>" class="wppaedit"><?php _e('Seq', 'wp-photo-album-plus'); ?></a></td>
1753
+ <?php
1754
+ }
1755
+ else {
1756
+ echo '<td></td>';
1757
+ } ?>
1758
+
1759
  <?php
1760
  $covid = max( $album['main_photo'], '0' );
1761
  if ( $covid ) {
1871
  <td ><?php _e('Edit', 'wp-photo-album-plus'); ?></td>
1872
  <td ><?php _e('Quick', 'wp-photo-album-plus'); ?></td>
1873
  <td ><?php _e('Bulk', 'wp-photo-album-plus'); ?></td>
1874
+ <td ><?php echo ( ! wppa_switch( 'porder_restricted' ) || wppa_user_is( 'administrator' ) ? __('Seq', 'wp-photo-album-plus') : '' ) ?></td>
1875
  <td ><?php _e('CovImg', 'wp-photo-album-plus'); ?></td>
1876
  <?php
1877
  if ( current_user_can( 'wppa_upload' ) ) {
2170
  <td ><?php _e('Edit', 'wp-photo-album-plus'); ?></td>
2171
  <td ><?php _e('Quick', 'wp-photo-album-plus'); ?></td>
2172
  <td ><?php _e('Bulk', 'wp-photo-album-plus'); ?></td>
2173
+ <td ><?php echo ( ! wppa_switch( 'porder_restricted' ) || wppa_user_is( 'administrator' ) ? __('Seq', 'wp-photo-album-plus') : '' ) ?></td>
2174
  <td ><?php _e('CovImg', 'wp-photo-album-plus'); ?></td>
2175
  <?php
2176
  if ( current_user_can( 'wppa_upload' ) ) {
2281
  <td ><?php _e('Edit', 'wp-photo-album-plus'); ?></td>
2282
  <td ><?php _e('Quick', 'wp-photo-album-plus'); ?></td>
2283
  <td ><?php _e('Bulk', 'wp-photo-album-plus'); ?></td>
2284
+ <td ><?php echo ( ! wppa_switch( 'porder_restricted' ) || wppa_user_is( 'administrator' ) ? __('Seq', 'wp-photo-album-plus') : '' ) ?></td>
2285
  <td ><?php _e('CovImg', 'wp-photo-album-plus'); ?></td>
2286
  <?php
2287
  if ( current_user_can( 'wppa_upload' ) ) {
2624
  <?php $ns = $counts['scheduledselfphotos']; ?>
2625
  <td><?php echo $na.'/'.$np.'/'.$nm.'/'.$ns; ?></td>
2626
 
2627
+ <?php if ( wppa_have_access( $album['id'] ) ) {// if ( $album['owner'] == wppa_get_user() || wppa_user_is('administrator') ) { ?>
2628
  <?php $url = wppa_ea_url($id) ?>
2629
  <td><a href="<?php echo($url) ?>" class="wppaedit"><?php _e('Edit', 'wp-photo-album-plus'); ?></a></td>
2630
  <td><a href="<?php echo($url.'&amp;quick') ?>" class="wppaedit"><?php _e('Quick', 'wp-photo-album-plus'); ?></a></td>
2631
  <td><a href="<?php echo($url.'&amp;bulk#manage-photos') ?>" class="wppaedit"><?php _e('Bulk', 'wp-photo-album-plus'); ?></a></td>
2632
+
2633
+ <?php if ( ! wppa_switch( 'porder_restricted' ) || wppa_user_is( 'administrator' ) ) {
2634
+ ?>
2635
+ <td><a href="<?php echo($url.'&amp;seq') ?>" class="wppaedit"><?php _e('Seq', 'wp-photo-album-plus'); ?></a></td>
2636
+ <?php
2637
+ }
2638
+ else {
2639
+ echo '<td></td>';
2640
+ } ?>
2641
+
2642
  <?php
2643
  $covid = max( $album['main_photo'], '0' );
2644
  if ( $covid ) {
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 7.5.01
7
  *
8
  */
9
 
@@ -2184,27 +2184,10 @@ function wppa_get_user_create_html( $alb, $width, $where = '', $mcr = false ) {
2184
  }
2185
 
2186
  // Can create album?
2187
- // if ( ! $parent && ! wppa_can_create_top_album() ) {
2188
- // return '';
2189
- // }
2190
  if ( $parent && ! wppa_can_create_album() ) {
2191
  return '';
2192
  }
2193
 
2194
- /*
2195
- if ( ! wppa_user_is( 'administrator' ) && wppa_switch( 'owner_only' ) ) {
2196
- if ( $parent ) {
2197
- $album = wppa_cache_album( $parent );
2198
-
2199
- // Need to be admin to create public subalbums
2200
- if ( $album['owner'] == '--- public ---' ) {
2201
- wppa_log('obs', 'pubic');
2202
- return '';
2203
- }
2204
- }
2205
- }
2206
- */
2207
-
2208
  // In a widget or multi column responsive?
2209
  $small = ( wppa_in_widget() == 'upload' || $mcr );
2210
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 7.5.03
7
  *
8
  */
9
 
2184
  }
2185
 
2186
  // Can create album?
 
 
 
2187
  if ( $parent && ! wppa_can_create_album() ) {
2188
  return '';
2189
  }
2190
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2191
  // In a widget or multi column responsive?
2192
  $small = ( wppa_in_widget() == 'upload' || $mcr );
2193
 
wppa-cloudinary.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /* Only loads when php version >= 5.3
3
  *
4
- * Version 7.3.00
5
  *
6
  */
7
 
@@ -134,9 +134,7 @@ global $wppa_cloudinary_api;
134
 
135
  $result = $wppa_cloudinary_api->delete_derived_resources( $pub_id );
136
  $result = $wppa_cloudinary_api->delete_resources( $pub_id );
137
- //wppa_log('Obs', 'Deleteing from Cloudinary: '.$pub_id);
138
- //wppa_log('Obs', 'Returned: '.serialize($result));
139
- //wppa_log('Obs',var_dump($result));
140
  if ( isset( $result->rate_limit_allowed ) ) {
141
  if( $result->rate_limit_remaining < '10' ) {
142
  wppa_log( 'Observation', 'Running out of Cloudinary API calls' );
1
  <?php
2
  /* Only loads when php version >= 5.3
3
  *
4
+ * Version 7.5.03
5
  *
6
  */
7
 
134
 
135
  $result = $wppa_cloudinary_api->delete_derived_resources( $pub_id );
136
  $result = $wppa_cloudinary_api->delete_resources( $pub_id );
137
+
 
 
138
  if ( isset( $result->rate_limit_allowed ) ) {
139
  if( $result->rate_limit_remaining < '10' ) {
140
  wppa_log( 'Observation', 'Running out of Cloudinary API calls' );
wppa-common-functions.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
- * Version 7.3.11
6
  *
7
  */
8
 
@@ -327,7 +327,7 @@ global $wppa_randseed_modified;
327
 
328
  // Log (debug)
329
  if ( false && $type=='' )
330
- wppa_log( 'obs', 'wppa_get_randseed returned {b}' . $result . '{/b}, ' .
331
  'type= {b}' . ( $type ? $type : 'default' ) . '{/b}, ' .
332
  'wp-page= {b}' . ( isset( $wppa_session['randpage'] ) ? $wppa_session['randpage'] : 'unknown' ) . '{/b}, ' .
333
  'uri= ' . $_SERVER['REQUEST_URI'] );
@@ -1062,20 +1062,6 @@ global $wppa;
1062
  return $result;
1063
  }
1064
 
1065
- /*
1066
- function wppa_table_exists( $xtable ) {
1067
- global $wpdb;
1068
- static $tables;
1069
-
1070
- if ( empty( $tables ) ) {
1071
- $tables = $wpdb->get_results( "SHOW TABLES FROM `" . DB_NAME . "`", ARRAY_A );
1072
- }
1073
-
1074
- return in_array( $xtable, $tables );
1075
- }
1076
- */
1077
-
1078
-
1079
  function wppa_clear_cache( $force = false ) {
1080
  global $cache_path;
1081
 
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
+ * Version 7.5.03
6
  *
7
  */
8
 
327
 
328
  // Log (debug)
329
  if ( false && $type=='' )
330
+ wppa_log( 'dbg', 'wppa_get_randseed returned {b}' . $result . '{/b}, ' .
331
  'type= {b}' . ( $type ? $type : 'default' ) . '{/b}, ' .
332
  'wp-page= {b}' . ( isset( $wppa_session['randpage'] ) ? $wppa_session['randpage'] : 'unknown' ) . '{/b}, ' .
333
  'uri= ' . $_SERVER['REQUEST_URI'] );
1062
  return $result;
1063
  }
1064
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1065
  function wppa_clear_cache( $force = false ) {
1066
  global $cache_path;
1067
 
wppa-defaults.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
- * Version 7.5.02
7
  *
8
  */
9
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
+ * Version 7.5.03
7
  *
8
  */
9
 
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 7.4.02
7
  *
8
  */
9
 
@@ -1307,6 +1307,9 @@ global $wppa_session;
1307
  // Start timer
1308
  $time = -microtime( true );
1309
 
 
 
 
1310
  // Make Album clause if album given
1311
  if ( wppa( 'start_album' ) ) {
1312
 
@@ -1550,15 +1553,14 @@ global $wppa_session;
1550
  $first = false;
1551
  }
1552
 
1553
- /* Looks useless */
1554
  // Album spec?
1555
- if ( wppa( 'start_album' ) ) {
1556
- $fac = ' AND ' . $album_clause . ' ';
1557
  }
1558
  else {
1559
- $fac = " AND album > 0";
1560
  }
1561
- /**/
1562
  // Prepare the query
1563
  if ( current_user_can( 'wppa_moderate' ) ) {
1564
  $query = "SELECT * FROM $wpdb->wppa_photos
@@ -1821,40 +1823,36 @@ global $wppa_session;
1821
  $root = $wppa_session['search_root'];
1822
  $root_albs = wppa_expand_enum( wppa_alb_to_enum_children( $root ) );
1823
  $root_albs = str_replace( '.', ',', $root_albs );
1824
- $alb_clause = $root_albs ? ' AND album IN ('.$root_albs.') ' : '';
1825
  }
1826
 
 
1827
  // Maybe cats limitation
1828
  elseif ( wppa( 'catbox' ) ) {
1829
 
1830
  $catalbs = $wpdb->get_col( "SELECT id FROM $wpdb->wppa_albums
1831
  WHERE cats LIKE '%" . wppa( 'catbox' ) . "%' " );
1832
 
 
 
 
 
 
1833
  if ( ! empty( $catalbs ) ) {
1834
  $alb_clause = " AND album IN ( " . implode( ',', $catalbs ) . " ) ";
1835
  }
1836
- else {
1837
- $alb_clause = " AND album > '0' ";
1838
- }
1839
  }
1840
 
1841
  // exclude separate if required
1842
- elseif ( ! $alb_clause && wppa_switch( 'excl_sep' ) ) {
1843
- $sep_albs = '';
1844
- $temp = $wpdb->get_results( "SELECT * FROM $wpdb->wppa_albums
1845
- WHERE a_parent = '-1'", ARRAY_A );
1846
- if ( ! empty( $temp ) ) {
1847
- $t = array();
1848
- foreach ( $temp as $item ) {
1849
- $t[] = $item['id'];
1850
- }
1851
- $sep_albs = implode( '.', $t );
1852
- $sep_albs = wppa_expand_enum( wppa_alb_to_enum_children( $sep_albs ) );
1853
- $sep_albs = str_replace( '.', ',', $sep_albs );
1854
- $alb_clause = $sep_albs ? ' AND album NOT IN ('.$sep_albs.') ' : '';
1855
  }
1856
  }
1857
 
 
 
 
1858
  // compose photo selection
1859
  if ( ! empty( $final_array ) ) {
1860
  $selection = " id IN (";
@@ -2013,6 +2011,7 @@ global $wppa_session;
2013
  }
2014
 
2015
  // Do query and return result after copy result to $thumbs!!
 
2016
  $thumbs = wppa_do_get_thumbs_query( $query );
2017
  return $thumbs;
2018
  }
@@ -2152,7 +2151,7 @@ global $wpdb;
2152
  // Handle the select thumbs query
2153
  // @1: The MySql query
2154
  // @2: bool. Set to false if the expected count of thumbs is always less than 2500
2155
- function wppa_do_get_thumbs_query( $query, $count_first = true ) {
2156
  global $wpdb;
2157
 
2158
  // Anything to do here?
@@ -2178,7 +2177,7 @@ global $wpdb;
2178
  );
2179
 
2180
  // Do we need to get the count first to decide if we get the full data and probably cache it ?
2181
- if ( $count_first || $invers || $exduprem ) {
2182
 
2183
  // Find count of the query result
2184
  $tempquery = str_replace( 'SELECT *', 'SELECT id', $query );
@@ -2186,12 +2185,12 @@ global $wpdb;
2186
  $count = $wpdb->get_var( 'SELECT FOUND_ROWS()' );
2187
 
2188
  // If less than 5000, get them and cache them
2189
- if ( $count <= 5000 && ! $invers && ! $exduprem ) {
2190
  $thumbs = $wpdb->get_results( $query, ARRAY_A );
2191
  $caching = true;
2192
  }
2193
 
2194
- // If more than 5000, or inverse requested, or exduprem use the ids only, and do not cache them
2195
  else {
2196
  $thumbs = $wpdb->get_results( $tempquery, ARRAY_A );
2197
  $caching = false;
@@ -2216,15 +2215,6 @@ global $wpdb;
2216
  }
2217
  }
2218
 
2219
- // Exclude separate albums?
2220
- if ( wppa_switch( 'excl_sep' ) ) {
2221
- foreach ( array_keys( $all ) as $all_key ) {
2222
- if ( wppa_is_separate( $all[$all_key]['album'] ) ) {
2223
- unset ( $all[$all_key] );
2224
- }
2225
- }
2226
- }
2227
-
2228
  // Resequence for slideshow pagination
2229
  $thumbs = array();
2230
  if ( ! empty( $all ) ) foreach( $all as $item ) {
@@ -2266,28 +2256,39 @@ function wppa_extended_duplicate_remove( &$thumbs ) {
2266
 
2267
  if ( is_array( $thumbs ) ) {
2268
  $c = count( $thumbs );
 
 
 
 
 
 
2269
  $i = 0;
2270
- while ( $i < ( $c - 1 ) ) {
2271
- if ( isset( $thumbs[$i] ) ) {
2272
- $j = $i + 1;
2273
- while ( $j < $c ) {
2274
- if ( isset( $thumbs[$j] ) ) {
2275
- $ret = wppa_are_items_equal( $thumbs[$i], $thumbs[$j] );
2276
- if ( $ret ) {
2277
- wppa_log( 'dbg', 'Items ' . $thumbs[$i]['id'] . ' and ' . $thumbs[$j]['id'] .
2278
- ' are identical.' );
2279
- unset( $thumbs[$j] );
2280
- }
2281
- }
2282
- $j++;
2283
  }
2284
  }
2285
  $i++;
2286
  }
 
 
 
 
 
 
 
 
 
 
 
2287
  }
2288
 
2289
  $end = microtime( true );
2290
- wppa_log( 'dbg', sprintf( 'wppa_extended_duplicate_remove() took %4.2f seconds', $end - $start ) );
2291
  }
2292
 
2293
  // Compare two items for equality
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 7.5.03
7
  *
8
  */
9
 
1307
  // Start timer
1308
  $time = -microtime( true );
1309
 
1310
+ // Compute separate albums
1311
+ $seps = str_replace( '.', ',', wppa_expand_enum( wppa_alb_to_enum_children( '-1' ) ) );
1312
+
1313
  // Make Album clause if album given
1314
  if ( wppa( 'start_album' ) ) {
1315
 
1553
  $first = false;
1554
  }
1555
 
 
1556
  // Album spec?
1557
+ if ( wppa_switch( 'excl_sep' ) && $seps ) {
1558
+ $album_clause = "album > 0 AND album NOT IN (" . $seps . ")";
1559
  }
1560
  else {
1561
+ $album_clause = "album > 0 ";
1562
  }
1563
+
1564
  // Prepare the query
1565
  if ( current_user_can( 'wppa_moderate' ) ) {
1566
  $query = "SELECT * FROM $wpdb->wppa_photos
1823
  $root = $wppa_session['search_root'];
1824
  $root_albs = wppa_expand_enum( wppa_alb_to_enum_children( $root ) );
1825
  $root_albs = str_replace( '.', ',', $root_albs );
1826
+ $alb_clause = $root_albs ? " AND album IN (" . $root_albs . ") " : "";
1827
  }
1828
 
1829
+
1830
  // Maybe cats limitation
1831
  elseif ( wppa( 'catbox' ) ) {
1832
 
1833
  $catalbs = $wpdb->get_col( "SELECT id FROM $wpdb->wppa_albums
1834
  WHERE cats LIKE '%" . wppa( 'catbox' ) . "%' " );
1835
 
1836
+ if ( wppa_switch( 'excl_sep' ) ) {
1837
+ $sep = explode( '.', wppa_expand_enum( wppa_alb_to_enum_children( '-1' ) ) );
1838
+ $catalbs = array_diff( $catalbs, $sep );
1839
+ }
1840
+
1841
  if ( ! empty( $catalbs ) ) {
1842
  $alb_clause = " AND album IN ( " . implode( ',', $catalbs ) . " ) ";
1843
  }
 
 
 
1844
  }
1845
 
1846
  // exclude separate if required
1847
+ if ( wppa_switch( 'excl_sep' ) && $seps && ! wppa( 'catbox' ) ) {
1848
+ if ( $alb_clause ) {
1849
+ $alb_clause .= " AND album NOT IN (" . $seps . ")";
 
 
 
 
 
 
 
 
 
 
1850
  }
1851
  }
1852
 
1853
+ // Exclude deleted
1854
+ $alb_clause .= " AND album > 0 ";
1855
+
1856
  // compose photo selection
1857
  if ( ! empty( $final_array ) ) {
1858
  $selection = " id IN (";
2011
  }
2012
 
2013
  // Do query and return result after copy result to $thumbs!!
2014
+ wppa_log( 'dbg', 'Thumbs query = ' . $query );
2015
  $thumbs = wppa_do_get_thumbs_query( $query );
2016
  return $thumbs;
2017
  }
2151
  // Handle the select thumbs query
2152
  // @1: The MySql query
2153
  // @2: bool. Set to false if the expected count of thumbs is always less than 2500
2154
+ function wppa_do_get_thumbs_query( $query ) {
2155
  global $wpdb;
2156
 
2157
  // Anything to do here?
2177
  );
2178
 
2179
  // Do we need to get the count first to decide if we get the full data and probably cache it ?
2180
+ if ( ! $exduprem ) {
2181
 
2182
  // Find count of the query result
2183
  $tempquery = str_replace( 'SELECT *', 'SELECT id', $query );
2185
  $count = $wpdb->get_var( 'SELECT FOUND_ROWS()' );
2186
 
2187
  // If less than 5000, get them and cache them
2188
+ if ( $count <= 5000 && ! $invers ) {
2189
  $thumbs = $wpdb->get_results( $query, ARRAY_A );
2190
  $caching = true;
2191
  }
2192
 
2193
+ // If more than 5000, or inverse requested, use the ids only, and do not cache them
2194
  else {
2195
  $thumbs = $wpdb->get_results( $tempquery, ARRAY_A );
2196
  $caching = false;
2215
  }
2216
  }
2217
 
 
 
 
 
 
 
 
 
 
2218
  // Resequence for slideshow pagination
2219
  $thumbs = array();
2220
  if ( ! empty( $all ) ) foreach( $all as $item ) {
2256
 
2257
  if ( is_array( $thumbs ) ) {
2258
  $c = count( $thumbs );
2259
+
2260
+ // New algorithm
2261
+ $to_remove = array();
2262
+
2263
+ // Check for duplicate
2264
+ $temp = wppa_array_sort( $thumbs, 'name' );
2265
  $i = 0;
2266
+ $j = count( $temp ) - 1;
2267
+ while ( $i < $j ) {
2268
+ if ( $temp[$i]['name'] == $temp[$i+1]['name'] ) {
2269
+
2270
+ // Names are equal.
2271
+ if ( wppa_are_items_equal( $temp[$i], $temp[$i+1] ) ) {
2272
+ $to_remove[] = $temp[$i+1]['id'];
 
 
 
 
 
 
2273
  }
2274
  }
2275
  $i++;
2276
  }
2277
+
2278
+ // Now remove
2279
+ $i = 0;
2280
+ $j = count( $thumbs ) - 1;
2281
+ while ( $i < $j ) {
2282
+ if ( in_array( $thumbs[$i]['id'], $to_remove ) ) {
2283
+ unset( $thumbs[$i] );
2284
+ }
2285
+ $i++;
2286
+ }
2287
+
2288
  }
2289
 
2290
  $end = microtime( true );
2291
+ wppa_log( 'dbg', sprintf( 'wppa_extended_duplicate_remove() took %5.3f seconds', $end - $start ) );
2292
  }
2293
 
2294
  // Compare two items for equality
wppa-maintenance.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
- * Version 7.4.00
7
  *
8
  */
9
 
@@ -774,9 +774,8 @@ global $wppa_endtime;
774
 
775
  case 'wppa_sync_cloud':
776
  $is_old = ( wppa_opt( 'max_cloud_life' ) ) && ( time() > ( $photo['timestamp'] + wppa_opt( 'max_cloud_life' ) ) );
777
- // $is_in_cloud = @ getimagesize( wppa_get_cloudinary_url( $photo['id'], 'test_only' ) );
778
  $is_in_cloud = isset( $wppa_session['cloudinary_ids'][$photo['id']] );
779
- // wppa_log('Obs', 'Id='.$photo['id'].', is old='.$is_old.', in cloud='.$is_in_cloud);
780
  if ( $is_old && $is_in_cloud ) {
781
  $to_delete_from_cloudinary[] = strval( $photo['id'] );
782
  if ( count( $to_delete_from_cloudinary ) == 10 ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains (not yet, but in the future maybe) all the maintenance routines
6
+ * Version 7.5.03
7
  *
8
  */
9
 
774
 
775
  case 'wppa_sync_cloud':
776
  $is_old = ( wppa_opt( 'max_cloud_life' ) ) && ( time() > ( $photo['timestamp'] + wppa_opt( 'max_cloud_life' ) ) );
 
777
  $is_in_cloud = isset( $wppa_session['cloudinary_ids'][$photo['id']] );
778
+
779
  if ( $is_old && $is_in_cloud ) {
780
  $to_delete_from_cloudinary[] = strval( $photo['id'] );
781
  if ( count( $to_delete_from_cloudinary ) == 10 ) {
wppa-non-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
- * Version 7.5.02
7
  *
8
  */
9
 
@@ -265,70 +265,47 @@ global $wppa_opt;
265
  // If you want to debug js, just delete the minified version; this will cause the normal
266
  // - readable - version to be loaded.
267
 
268
- $any_lightbox = ( wppa_opt( 'lightbox_name' ) == 'wppa' ) &&
269
- ( wppa_switch( 'lightbox_global' ) ||
270
- in_array( 'lightbox', $wppa_opt ) ||
271
- in_array( 'lightboxsingle', $wppa_opt )
 
272
  );
273
 
274
- $js_files = array ( 'wppa',
275
- 'wppa-slideshow',
276
- 'wppa-ajax-front',
277
- 'wppa-lightbox',
278
- 'wppa-popup',
279
- 'wppa-touch',
280
- 'wppa-utils',
281
- 'wppa-zoom',
282
- );
283
-
284
- $js_dept1 = array( 'jquery', 'jquery-form', 'wppa-utils' );
285
- if ( wppa_switch( 'ajax_render_modal' ) || wppa_opt( 'upload_edit' ) == 'new' || wppa_switch( 'photo_shortcode_enabled' ) ) {
286
- $js_dept1[] = 'jquery-ui-dialog';
287
  }
288
 
289
- $js_depts = array ( $js_dept1,
290
- array( 'jquery' ),
291
- array( 'jquery' ),
292
- array( 'jquery' ),
293
- array( 'jquery' ),
294
- array( 'jquery' ),
295
- array( 'jquery' ),
296
- array( 'jquery' ),
297
- );
298
-
299
- $js_doits = array ( true,
300
- true,
301
- true,
302
- $any_lightbox,
303
- true,
304
- wppa_switch( 'slide_swipe' ) || $any_lightbox,
305
- true,
306
- true,
307
- );
308
-
309
- $js_footer = array ( $footer,
310
- $footer,
311
- $footer,
312
- $footer,
313
- $footer,
314
- $footer,
315
- $footer,
316
- $footer,
317
- );
318
-
319
- foreach ( array_keys( $js_files ) as $idx ) {
320
- if ( $js_doits[$idx] ) {
321
- if ( is_file( dirname( __FILE__ ) . '/js/' . $js_files[$idx] . '.min.js' ) ) {
322
- $js_ver = date( "ymd-Gis", filemtime( plugin_dir_path( __FILE__ ) . 'js/' . $js_files[$idx] . '.min.js' ) );
323
- wp_enqueue_script( $js_files[$idx], WPPA_URL . '/js/' . $js_files[$idx] . '.min.js', $js_depts[$idx], $js_ver, $js_footer[$idx] );
324
  }
325
  else {
326
- $js_ver = date( "ymd-Gis", filemtime( plugin_dir_path( __FILE__ ) . 'js/' . $js_files[$idx] . '.js' ) );
327
- wp_enqueue_script( $js_files[$idx], WPPA_URL . '/js/' . $js_files[$idx] . '.js', $js_depts[$idx], $js_ver, $js_footer[$idx] );
328
  }
329
  }
330
  }
331
 
 
332
  // google maps
333
  if ( ( wppa_switch( 'load_map_api' ) || wppa_opt( 'gpx_implementation' ) == 'wppa-plus-embedded' ) && strpos( wppa_opt( 'custom_content' ), 'w#location' ) !== false ) {
334
  $key = wppa_opt( 'map_apikey' );
@@ -347,12 +324,6 @@ global $wppa_opt;
347
  wp_enqueue_script( 'nicescrollr-easing-min-js', $easing_url, array( 'jquery' ), 'all' );
348
  }
349
 
350
- // Masonry
351
- if ( true ) {
352
- $masonry_url = WPPA_URL . '/vendor/masonry/masonry.min.js';
353
- wp_enqueue_script( 'masonry-min-js', $masonry_url, array( 'jquery' ), $wppa_api_version, $footer );
354
- }
355
-
356
  // Panorama
357
  if ( wppa_switch( 'enable_panorama' ) ) {
358
 
@@ -380,6 +351,7 @@ global $wppa_opt;
380
  $url = WPPA_URL . '/vendor/jquery-fullscreen/release/jquery.fullscreen-0.4.1.min.js';
381
  wp_enqueue_script( 'jquery-fullscreen-min-js', $url, array( 'jquery' ), $wppa_api_version );
382
  }
 
383
 
384
  // wppa-init
385
  if ( ! file_exists( WPPA_UPLOAD_PATH.'/dynamic/wppa-init.'.$wppa_lang.'.js' ) ) {
@@ -505,7 +477,7 @@ global $wppa_session;
505
 
506
  /* START Lightbox vars */
507
  jQuery("#wppa-overlay-bg").css({height:window.innerHeight});
508
- wppaOvlModeInitial = "'.( wppa( 'is_mobile' ) ? 'padded' : 'normal' ).'";
509
  wppaOvlTxtHeight = "'.$ovlh.'";
510
  wppaOvlOpacity = '.(wppa_opt( 'ovl_opacity' )/100).';
511
  wppaOvlOnclickType = "'.wppa_opt( 'ovl_onclick' ).'";
@@ -520,14 +492,9 @@ global $wppa_session;
520
  '.( wppa_opt( 'fontcolor_lightbox' ) ? 'wppaOvlFontColor = "'.wppa_opt( 'fontcolor_lightbox' ).'"' : '').'
521
  '.( wppa_opt( 'fontweight_lightbox' ) ? 'wppaOvlFontWeight = "'.wppa_opt( 'fontweight_lightbox' ).'"' : '').'
522
  '.( wppa_opt( 'fontsize_lightbox' ) ? 'wppaOvlLineHeight = "'.(wppa_opt( 'fontsize_lightbox' ) + '2').'"' : '').'
523
- wppaOvlFullLegenda = "'.__('Keys: f = next mode; q,x = exit; p = previous, n = next, s = start/stop, d = dismiss this notice.', 'wp-photo-album-plus').'";
524
- wppaOvlFullLegendaSingle = "'.__('Keys: f = next mode; q,x = exit; d = dismiss this notice.', 'wp-photo-album-plus').'";
525
- wppaOvlFullLegendaPanorama = "'.__('Keys: q,x = exit; p = previous, n = next, s = start/stop, d = dismiss this notice.', 'wp-photo-album-plus').'";
526
- wppaOvlFullLegendaSinglePanorama = "'.__('Keys: q,x = exit; d = dismiss this notice.', 'wp-photo-album-plus').'";
527
  wppaOvlVideoStart = '.( wppa_switch( 'ovl_video_start' ) ? 'true' : 'false' ).';
528
  wppaOvlAudioStart = '.( wppa_switch( 'ovl_audio_start' ) ? 'true' : 'false' ).';
529
  wppaOvlShowStartStop = '.( wppa_switch( 'ovl_show_startstop' ) ? 'true' : 'false' ).';
530
- wppaToggleFullScreen = "'. __( 'Toggle fullscreen', 'wp-photo-album-plus' ) . '";
531
  wppaIsMobile = '.( wppa_is_mobile() ? 'true' : 'false' ).';
532
  wppaOvlIconSize = "'.wppa_opt( 'nav_icon_size_lightbox' ).'px";
533
  wppaOvlBrowseOnClick = '.( wppa_switch( 'ovl_browse_on_click' ) ? 'true' : 'false' ).';
@@ -631,14 +598,6 @@ add_action( 'plugins_loaded', 'wppa_redirect', '1' );
631
 
632
  function wppa_redirect() {
633
 
634
- // Do we come from a login form ?
635
- /*
636
- if ( isset( $_POST['redirect_to'] ) ) {
637
- wppa_log( 'obs', 'Redirect to: ' . $_POST['redirect_to'] );
638
- wp_redirect( $_POST['redirect_to'] );
639
- }
640
- */
641
-
642
  if ( ! isset( $_SERVER["REQUEST_URI"] ) ) return;
643
 
644
  $uri = $_SERVER["REQUEST_URI"];
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 7.5.03
7
  *
8
  */
9
 
265
  // If you want to debug js, just delete the minified version; this will cause the normal
266
  // - readable - version to be loaded.
267
 
268
+ // The js dependancies
269
+ $js_depts = array( 'jquery',
270
+ 'jquery-form',
271
+ 'jquery-masonry',
272
+ 'jquery-ui-dialog',
273
  );
274
 
275
+ // First see if an 'all' file is present. This is to save http requests
276
+ $all_file = dirname( __FILE__ ) . '/js/wppa-all.js';
277
+ if ( wppa_is_file( $all_file ) ) {
278
+ $js_ver = date( "ymd-Gis", filemtime( $all_file ) );
279
+ wp_enqueue_script( 'wppa', WPPA_URL . '/js/wppa-all.js', $js_depts, $js_ver, $footer );
 
 
 
 
 
 
 
 
280
  }
281
 
282
+ // No all file, do them one by one
283
+ else {
284
+ $js_files = array(
285
+ 'wppa-utils',
286
+ 'wppa',
287
+ 'wppa-slideshow',
288
+ 'wppa-ajax-front',
289
+ 'wppa-lightbox',
290
+ 'wppa-popup',
291
+ 'wppa-touch',
292
+ 'wppa-zoom',
293
+ );
294
+
295
+
296
+ foreach ( $js_files as $file ) {
297
+ if ( is_file( dirname( __FILE__ ) . '/js/' . $file . '.min.js' ) ) {
298
+ $js_ver = date( "ymd-Gis", filemtime( plugin_dir_path( __FILE__ ) . 'js/' . $file . '.min.js' ) );
299
+ wp_enqueue_script( $file, WPPA_URL . '/js/' . $file . '.min.js', $js_depts, $js_ver, $footer );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
300
  }
301
  else {
302
+ $js_ver = date( "ymd-Gis", filemtime( plugin_dir_path( __FILE__ ) . 'js/' . $file . '.js' ) );
303
+ wp_enqueue_script( $file, WPPA_URL . '/js/' . $file . '.js', $js_depts, $js_ver, $footer );
304
  }
305
  }
306
  }
307
 
308
+ // Start other (vendor) js files
309
  // google maps
310
  if ( ( wppa_switch( 'load_map_api' ) || wppa_opt( 'gpx_implementation' ) == 'wppa-plus-embedded' ) && strpos( wppa_opt( 'custom_content' ), 'w#location' ) !== false ) {
311
  $key = wppa_opt( 'map_apikey' );
324
  wp_enqueue_script( 'nicescrollr-easing-min-js', $easing_url, array( 'jquery' ), 'all' );
325
  }
326
 
 
 
 
 
 
 
327
  // Panorama
328
  if ( wppa_switch( 'enable_panorama' ) ) {
329
 
351
  $url = WPPA_URL . '/vendor/jquery-fullscreen/release/jquery.fullscreen-0.4.1.min.js';
352
  wp_enqueue_script( 'jquery-fullscreen-min-js', $url, array( 'jquery' ), $wppa_api_version );
353
  }
354
+ // End other (vendor) js files
355
 
356
  // wppa-init
357
  if ( ! file_exists( WPPA_UPLOAD_PATH.'/dynamic/wppa-init.'.$wppa_lang.'.js' ) ) {
477
 
478
  /* START Lightbox vars */
479
  jQuery("#wppa-overlay-bg").css({height:window.innerHeight});
480
+ wppaOvlModeInitial = "normal";
481
  wppaOvlTxtHeight = "'.$ovlh.'";
482
  wppaOvlOpacity = '.(wppa_opt( 'ovl_opacity' )/100).';
483
  wppaOvlOnclickType = "'.wppa_opt( 'ovl_onclick' ).'";
492
  '.( wppa_opt( 'fontcolor_lightbox' ) ? 'wppaOvlFontColor = "'.wppa_opt( 'fontcolor_lightbox' ).'"' : '').'
493
  '.( wppa_opt( 'fontweight_lightbox' ) ? 'wppaOvlFontWeight = "'.wppa_opt( 'fontweight_lightbox' ).'"' : '').'
494
  '.( wppa_opt( 'fontsize_lightbox' ) ? 'wppaOvlLineHeight = "'.(wppa_opt( 'fontsize_lightbox' ) + '2').'"' : '').'
 
 
 
 
495
  wppaOvlVideoStart = '.( wppa_switch( 'ovl_video_start' ) ? 'true' : 'false' ).';
496
  wppaOvlAudioStart = '.( wppa_switch( 'ovl_audio_start' ) ? 'true' : 'false' ).';
497
  wppaOvlShowStartStop = '.( wppa_switch( 'ovl_show_startstop' ) ? 'true' : 'false' ).';
 
498
  wppaIsMobile = '.( wppa_is_mobile() ? 'true' : 'false' ).';
499
  wppaOvlIconSize = "'.wppa_opt( 'nav_icon_size_lightbox' ).'px";
500
  wppaOvlBrowseOnClick = '.( wppa_switch( 'ovl_browse_on_click' ) ? 'true' : 'false' ).';
598
 
599
  function wppa_redirect() {
600
 
 
 
 
 
 
 
 
 
601
  if ( ! isset( $_SERVER["REQUEST_URI"] ) ) return;
602
 
603
  $uri = $_SERVER["REQUEST_URI"];
wppa-photo-files.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-photo-files.php
3
  *
4
  * Functions used to create/manipulate photofiles
5
- * Version 7.3.12
6
  *
7
  */
8
 
@@ -454,7 +454,7 @@ function wppa_create_thumbnail( $id, $use_source = true ) {
454
  // If pdf, find image file
455
  if ( wppa_get_ext( $file ) == 'pdf' ) {
456
  $file = wppa_strip_ext( $file ) . '.' . wppa_get_photo_item( $id, 'ext' );
457
-
458
  // If no (poster) file exists, take the document-stub file
459
  if ( ! is_file( $file ) ) {
460
  $file = WPPA_UPLOAD_PATH . '/documentstub.png';
@@ -726,7 +726,7 @@ function wppa_image_magick( $command ) {
726
 
727
  if ( $err ) {
728
  $key = $err ? 'Err' : 'Dbg';
729
- wppa_log( $key, 'Exec ' . $logcom . ' returned ' . $err ); //, true );
730
  foreach( $out as $line ) {
731
  wppa_log( 'OBS', $line );
732
  }
@@ -735,7 +735,7 @@ function wppa_image_magick( $command ) {
735
  return $err;
736
  }
737
 
738
- // Convert .png's to ,jpg's
739
  //
740
  // @1: photo id (integer) or pathname (string)
741
  function wppa_convert_png_to_jpg( $arg ) {
2
  /* wppa-photo-files.php
3
  *
4
  * Functions used to create/manipulate photofiles
5
+ * Version 7.5.03
6
  *
7
  */
8
 
454
  // If pdf, find image file
455
  if ( wppa_get_ext( $file ) == 'pdf' ) {
456
  $file = wppa_strip_ext( $file ) . '.' . wppa_get_photo_item( $id, 'ext' );
457
+
458
  // If no (poster) file exists, take the document-stub file
459
  if ( ! is_file( $file ) ) {
460
  $file = WPPA_UPLOAD_PATH . '/documentstub.png';
726
 
727
  if ( $err ) {
728
  $key = $err ? 'Err' : 'Dbg';
729
+ wppa_log( $key, 'Exec ' . $logcom . ' returned ' . $err );
730
  foreach( $out as $line ) {
731
  wppa_log( 'OBS', $line );
732
  }
735
  return $err;
736
  }
737
 
738
+ // Convert .png's to .jpg's
739
  //
740
  // @1: photo id (integer) or pathname (string)
741
  function wppa_convert_png_to_jpg( $arg ) {
wppa-picture.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Make the picture html
6
- * Version 7.5.02
7
  *
8
  */
9
 
@@ -569,7 +569,7 @@ function wppa_get_spheric_pan_html( $args ) {
569
  '</span>';
570
 
571
  // Mobile is always on fullscreen mode
572
- if ( ! wppa_is_mobile() ) {
573
  $result .=
574
  '<span
575
  id="wppa-fulls-btn-2"
@@ -589,7 +589,7 @@ function wppa_get_spheric_pan_html( $args ) {
589
  >' .
590
  wppa_get_svghtml( 'Exit-Full-Screen-2', $iconsize, true ) .
591
  '</span>';
592
- }
593
  }
594
 
595
 
@@ -1230,7 +1230,7 @@ function wppa_get_flat_pan_html( $args ) {
1230
  '</span>';
1231
 
1232
  // Mobile is always on fullscreen mode
1233
- if ( ! wppa_is_mobile() ) {
1234
  $result .=
1235
  '<span
1236
  id="wppa-fulls-btn-2"
@@ -1250,7 +1250,7 @@ function wppa_get_flat_pan_html( $args ) {
1250
  >' .
1251
  wppa_get_svghtml( 'Exit-Full-Screen-2', $iconsize, true ) .
1252
  '</span>';
1253
- }
1254
  }
1255
 
1256
  $result .=
@@ -1917,7 +1917,7 @@ function wppa_get_zoom_pan_html( $args ) {
1917
  '</span>';
1918
 
1919
  // Mobile is always on fullscreen mode
1920
- if ( ! wppa_is_mobile() ) {
1921
  $result .=
1922
  '<span
1923
  id="wppa-fulls-btn-2"
@@ -1937,7 +1937,7 @@ function wppa_get_zoom_pan_html( $args ) {
1937
  >' .
1938
  wppa_get_svghtml( 'Exit-Full-Screen-2', $iconsize, true ) .
1939
  '</span>';
1940
- }
1941
  }
1942
 
1943
  // End controlbar
3
  * Package: wp-photo-album-plus
4
  *
5
  * Make the picture html
6
+ * Version 7.5.03
7
  *
8
  */
9
 
569
  '</span>';
570
 
571
  // Mobile is always on fullscreen mode
572
+ // if ( ! wppa_is_mobile() ) {
573
  $result .=
574
  '<span
575
  id="wppa-fulls-btn-2"
589
  >' .
590
  wppa_get_svghtml( 'Exit-Full-Screen-2', $iconsize, true ) .
591
  '</span>';
592
+ // }
593
  }
594
 
595
 
1230
  '</span>';
1231
 
1232
  // Mobile is always on fullscreen mode
1233
+ // if ( ! wppa_is_mobile() ) {
1234
  $result .=
1235
  '<span
1236
  id="wppa-fulls-btn-2"
1250
  >' .
1251
  wppa_get_svghtml( 'Exit-Full-Screen-2', $iconsize, true ) .
1252
  '</span>';
1253
+ // }
1254
  }
1255
 
1256
  $result .=
1917
  '</span>';
1918
 
1919
  // Mobile is always on fullscreen mode
1920
+ // if ( ! wppa_is_mobile() ) {
1921
  $result .=
1922
  '<span
1923
  id="wppa-fulls-btn-2"
1937
  >' .
1938
  wppa_get_svghtml( 'Exit-Full-Screen-2', $iconsize, true ) .
1939
  '</span>';
1940
+ // }
1941
  }
1942
 
1943
  // End controlbar
wppa-session.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all session routines
6
- * Version 7.1.07
7
  *
8
  * Firefox modifies data in the superglobal $_SESSION.
9
  * See https://bugzilla.mozilla.org/show_bug.cgi?id=991019
@@ -37,7 +37,6 @@ global $wppa_session;
37
  }
38
  if ( ! $found ) {
39
  $wppa_session['id'] = '0';
40
- // wppa_log('obs', 'Table '.WPPA_SESSION.' not found during session start. DB='.DB_NAME);
41
  return false;
42
  }
43
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all session routines
6
+ * Version 7.5.03
7
  *
8
  * Firefox modifies data in the superglobal $_SESSION.
9
  * See https://bugzilla.mozilla.org/show_bug.cgi?id=991019
37
  }
38
  if ( ! $found ) {
39
  $wppa_session['id'] = '0';
 
40
  return false;
41
  }
42
  }
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 7.5.02
7
  *
8
  */
9
 
@@ -5581,16 +5581,10 @@ global $wppa_supported_camara_brands;
5581
  $help = '';
5582
  $slug = 'wppa_ovl_mode_initial';
5583
  $opts = array( __('Normal', 'wp-photo-album-plus'),
5584
- __('Padded', 'wp-photo-album-plus'),
5585
- __('Stretched', 'wp-photo-album-plus'),
5586
- __('Clipped', 'wp-photo-album-plus'),
5587
- __('Real size', 'wp-photo-album-plus'),
5588
  );
5589
  $vals = array( 'normal',
5590
  'padded',
5591
- 'stretched',
5592
- 'clipped',
5593
- 'realsize',
5594
  );
5595
  $html = wppa_select($slug,$opts,$vals);
5596
  $clas = '';
@@ -5602,16 +5596,10 @@ global $wppa_supported_camara_brands;
5602
  $help = '';
5603
  $slug = 'wppa_ovl_mode_initial_mob';
5604
  $opts = array( __('Normal', 'wp-photo-album-plus'),
5605
- __('Padded', 'wp-photo-album-plus'),
5606
- __('Stretched', 'wp-photo-album-plus'),
5607
- __('Clipped', 'wp-photo-album-plus'),
5608
- __('Real size', 'wp-photo-album-plus'),
5609
  );
5610
  $vals = array( 'normal',
5611
  'padded',
5612
- 'stretched',
5613
- 'clipped',
5614
- 'realsize',
5615
  );
5616
  $html = wppa_select($slug,$opts,$vals);
5617
  $clas = '';
@@ -7480,9 +7468,9 @@ global $wppa_supported_camara_brands;
7480
  $tags = 'access,cover';
7481
  wppa_setting($slug, '3', $name, $desc, $html, $help, $clas, $tags);
7482
 
7483
- $name = __('Photo order# is restricted', 'wp-photo-album-plus');
7484
- $desc = __('Changing <b>Photo sort order #</b> is a restricted action.', 'wp-photo-album-plus');
7485
- $help = (__('If checked: Photo sort order #: can not be set in photo admin by users not having admin rights.', 'wp-photo-album-plus'));
7486
  $slug = 'wppa_porder_restricted';
7487
  $html1 = wppa_checkbox($slug);
7488
  $html2 = '';
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 7.5.03
7
  *
8
  */
9
 
5581
  $help = '';
5582
  $slug = 'wppa_ovl_mode_initial';
5583
  $opts = array( __('Normal', 'wp-photo-album-plus'),
5584
+ __('Fullscreen', 'wp-photo-album-plus'),
 
 
 
5585
  );
5586
  $vals = array( 'normal',
5587
  'padded',
 
 
 
5588
  );
5589
  $html = wppa_select($slug,$opts,$vals);
5590
  $clas = '';
5596
  $help = '';
5597
  $slug = 'wppa_ovl_mode_initial_mob';
5598
  $opts = array( __('Normal', 'wp-photo-album-plus'),
5599
+ __('Fullscreen', 'wp-photo-album-plus'),
 
 
 
5600
  );
5601
  $vals = array( 'normal',
5602
  'padded',
 
 
 
5603
  );
5604
  $html = wppa_select($slug,$opts,$vals);
5605
  $clas = '';
7468
  $tags = 'access,cover';
7469
  wppa_setting($slug, '3', $name, $desc, $html, $help, $clas, $tags);
7470
 
7471
+ $name = __('Photo order is restricted', 'wp-photo-album-plus');
7472
+ $desc = __('Changing <b>Photo sort order</b> is a restricted action.', 'wp-photo-album-plus');
7473
+ $help = (__('If checked: Photo sort order and order#: can not be set in album and photo admin by users not having admin rights.', 'wp-photo-album-plus'));
7474
  $slug = 'wppa_porder_restricted';
7475
  $html1 = wppa_checkbox($slug);
7476
  $html2 = '';
wppa-users.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains user and capabilities related routines
6
- * Version 7.4.00
7
  *
8
  */
9
 
@@ -40,18 +40,15 @@ static $users;
40
 
41
  // Wrapper for get_user_by()
42
  function wppa_get_user_by( $key, $user ) {
43
- // wppa_log( 'Obs', 'wppa_get_user_by called with args ' . $key . ', ' . $user, true );
44
  static $usercache;
45
 
46
  // Done this one before?
47
  if ( isset( $usercache[$key][$user] ) ) {
48
- // wppa_log( 'Obs', 'wppa_get_user_by cache used for ' . $key . ', ' . $user );
49
  return $usercache[$key][$user];
50
  }
51
 
52
  $result = get_user_by( $key, $user );
53
  $usercache[$key][$user] = $result;
54
- // wppa_log( 'Obs', 'wppa_get_user_by new cache entry for ' . $key . ', ' . $user );
55
  return $result;
56
  }
57
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains user and capabilities related routines
6
+ * Version 7.5.03
7
  *
8
  */
9
 
40
 
41
  // Wrapper for get_user_by()
42
  function wppa_get_user_by( $key, $user ) {
 
43
  static $usercache;
44
 
45
  // Done this one before?
46
  if ( isset( $usercache[$key][$user] ) ) {
 
47
  return $usercache[$key][$user];
48
  }
49
 
50
  $result = get_user_by( $key, $user );
51
  $usercache[$key][$user] = $result;
 
52
  return $result;
53
  }
54
 
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 7.5.02
7
  *
8
  */
9
 
@@ -708,10 +708,18 @@ global $wpdb;
708
  $time = time();
709
  $total = 0;
710
 
 
 
 
 
 
 
 
 
711
  // Get the existing tags raw
712
  $raw_tagcol = $wpdb->get_col( "SELECT DISTINCT tags FROM $wpdb->wppa_photos
713
  WHERE status NOT IN ('pending','scheduled')
714
- AND album > 0
715
  AND tags <> ''" );
716
  $raw_tags = implode( ',', $raw_tagcol ) . wppa_opt( 'minimum_tags' );
717
  $san_tags = trim( wppa_sanitize_tags( $raw_tags ), ',' );
@@ -724,7 +732,7 @@ global $wpdb;
724
  $result[$tag]['tag'] = $tag;
725
  $result[$tag]['ids'] = $wpdb->get_col( $wpdb->prepare( "SELECT id FROM $wpdb->wppa_photos
726
  WHERE status NOT IN ('pending','scheduled')
727
- AND album > 0
728
  AND tags LIKE %s", '%' . $wpdb->esc_like( ',' . $tag . ',' ) . '%' ) );
729
  $result[$tag]['count'] = count( $result[$tag]['ids'] );
730
  $total += $result[$tag]['count'];
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 7.5.03
7
  *
8
  */
9
 
708
  $time = time();
709
  $total = 0;
710
 
711
+ // Exclude seps?
712
+ if ( wppa_switch( 'excl_sep' ) ) {
713
+ $alb_clause = "album > 0 AND album NOT IN (" . str_replace( '.', ',', wppa_expand_enum( wppa_alb_to_enum_children( '-1' ) ) ) . ")";
714
+ }
715
+ else {
716
+ $alb_clause = "album > 0";
717
+ }
718
+
719
  // Get the existing tags raw
720
  $raw_tagcol = $wpdb->get_col( "SELECT DISTINCT tags FROM $wpdb->wppa_photos
721
  WHERE status NOT IN ('pending','scheduled')
722
+ AND $alb_clause
723
  AND tags <> ''" );
724
  $raw_tags = implode( ',', $raw_tagcol ) . wppa_opt( 'minimum_tags' );
725
  $san_tags = trim( wppa_sanitize_tags( $raw_tags ), ',' );
732
  $result[$tag]['tag'] = $tag;
733
  $result[$tag]['ids'] = $wpdb->get_col( $wpdb->prepare( "SELECT id FROM $wpdb->wppa_photos
734
  WHERE status NOT IN ('pending','scheduled')
735
+ AND $alb_clause
736
  AND tags LIKE %s", '%' . $wpdb->esc_like( ',' . $tag . ',' ) . '%' ) );
737
  $result[$tag]['count'] = count( $result[$tag]['ids'] );
738
  $total += $result[$tag]['count'];
wppa-wpdb-insert.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
- * Version 7.4.03
7
  *
8
  */
9
 
@@ -225,7 +225,6 @@ global $wpdb;
225
  if ( is_user_logged_in() ) {
226
  $user = wp_get_current_user();
227
  $userid = $user->ID;
228
- // wppa_log('obs','userid='.$userid);
229
  }
230
  else {
231
  $userid = -1;
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level wpdb routines that add new records
6
+ * Version 7.5.03
7
  *
8
  */
9
 
225
  if ( is_user_logged_in() ) {
226
  $user = wp_get_current_user();
227
  $userid = $user->ID;
 
228
  }
229
  else {
230
  $userid = -1;
wppa.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
- * Version: 7.5.02.008
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/
@@ -23,8 +23,8 @@ global $wpdb;
23
  global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
- global $wppa_revno; $wppa_revno = '7502'; // WPPA db version
27
- global $wppa_api_version; $wppa_api_version = '7.5.02.008'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
+ * Version: 7.5.03.006
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
23
  global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
+ global $wppa_revno; $wppa_revno = '7503'; // WPPA db version
27
+ global $wppa_api_version; $wppa_api_version = '7.5.03.006'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';