WP Photo Album Plus - Version 7.2.02.005

Version Description

= 7.2.02 =

  • This version addresses various bug fixes and feature requests.

= 7.2.01 =

  • This version addresses various bug fixes and feature requests.

= 7.2.00 =

  • This version addresses various bug fixes and feature requests.

= 7.1.11 =

  • This version addresses various bug fixes and feature requests.

= 7.1.10 =

  • This version addresses various bug fixes and feature requests.

= 7.1.09 =

  • This version addresses various bug fixes and feature requests.

= 7.1.08 =

  • This version addresses various bug fixes and feature requests.

= 7.1.07 =

  • This version addresses various bug fixes and feature requests.

= 7.1.06 =

  • This version addresses various bug fixes and feature requests.

= 7.1.05 =

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

= 7.1.04 =

  • This version addresses various bug fixes.

= 7.1.03 =

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

= 7.1.02 =

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

= 7.1.01 =

  • This version addresses various bug fixes and feature requests.

= 7.1.00 =

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

= 7.0.11 =

  • This version addresses various bug fixes and feature requests.

= 7.0.11 =

  • This version addresses various bug fixes

= 7.0.10 =

  • This version addresses various bug fixes

= 7.0.09 =

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

= 7.0.08 =

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

= 7.0.07 =

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

= 7.0.06 =

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

= 7.0.05 =

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

= 7.0.04 =

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

= 7.0.03 =

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

= 7.0.02 =

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

= 7.0.01 =

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

= 7.0.00 =

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

= 6.9.21 =

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

= 6.9.20 =

  • This version addresses various bug fixes

= 6.9.19 =

  • This version addresses various minor bug fixes

= 6.9.18 =

  • This version addresses various minor bug fixes

= 6.9.17 =

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

= 6.9.16 =

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

= 6.9.15 =

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

= 6.9.14 =

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

= 6.9.13 =

  • Security release.

= 6.9.12 =

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

= 6.9.11 =

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

= 6.9.10 =

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

= 6.9.09 =

  • Panorama support phase III.

= 6.9.08 =

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

= 6.9.07 =

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

= 6.9.06 =

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

= 6.9.05 =

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

= 6.9.04 =

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

= 6.9.03 =

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

= 6.9.02 =

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

= 6.9.01 =

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

= 6.9.00 =

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

= 6.8.09

  • This version addresses various bug fixes and code edits.

= 6.8.08 =

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

= 6.8.07 =

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

= 6.8.06 =

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

= 6.8.05 =

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

= 6.8.04 =

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

Release Info

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

Code changes from version 7.2.01.004 to 7.2.02.005

changelog.txt CHANGED
@@ -1,5 +1,11 @@
1
WP Photo Album Plus Changelog
2
3
= 7.2.01 =
4
5
* Changed the algoritm of the extended duplicate removal of search operations.
1
WP Photo Album Plus Changelog
2
3
+ = 7.2.02 =
4
+
5
+ * Added cover type Grid with images only.
6
+ * Added Table IV-G2.2: Click om image, to browse on image click.
7
+ * Entering a path to imagick commands always returned an errormessage, even when the path was correct. Fixed.
8
+
9
= 7.2.01 =
10
11
* Changed the algoritm of the extended duplicate removal of search operations.
js/wppa-lightbox.js CHANGED
@@ -3,7 +3,7 @@
3
// Conatins lightbox modules
4
// Dependancies: wppa.js and default wp jQuery library
5
//
6
- var wppaLightboxVersion = '7.2.01';
7
8
// Global inits
9
var wppaNormsBtnOpac = 0.75;
@@ -19,6 +19,7 @@ var wppaOvlFsExitBtnSize = '48';
19
var wppaOvlActivePanorama = 0;
20
var wppaOvlHasPanoramas = false;
21
var wppaGlobalOvlPanoramaId = 0;
22
23
// Global size specs
24
var wppaSavedContainerWidth = 0;
@@ -496,6 +497,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx, 'force' );
496
' ontouchend="wppaTouchEnd( event );"' +
497
' ontouchmove="wppaTouchMove( event );"' +
498
' ontouchcancel="wppaTouchCancel( event );"' +
499
' onpause="wppaOvlVideoPlaying = false;"' +
500
' onplay="wppaOvlVideoPlaying = true;"' +
501
' style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;"' +
@@ -527,6 +529,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx, 'force' );
527
' ontouchend="wppaTouchEnd( event );"' +
528
' ontouchmove="wppaTouchMove( event );"' +
529
' ontouchcancel="wppaTouchCancel( event );"' +
530
' style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;"' +
531
' alt="'+wppaOvlAlts[idx]+'"' +
532
' >'+
@@ -552,6 +555,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx, 'force' );
552
' ontouchend="wppaTouchEnd( event );"'+
553
' ontouchmove="wppaTouchMove( event );"'+
554
' ontouchcancel="wppaTouchCancel( event );"'+
555
' src="'+wppaOvlUrls[idx]+'"'+
556
' style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;"'+
557
' alt="'+wppaOvlAlts[idx]+'"'+
@@ -695,6 +699,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx, 'force' );
695
' ontouchend="wppaTouchEnd( event );"' +
696
' ontouchmove="wppaTouchMove( event );"' +
697
' ontouchcancel="wppaTouchCancel( event );" ' +
698
' controls' +
699
' style="' +
700
'border-width:' + wppaOvlBorderWidth + 'px ' + wppaOvlBorderWidth + 'px 0;' +
@@ -730,6 +735,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx, 'force' );
730
' ontouchend="wppaTouchEnd( event );"' +
731
' ontouchmove="wppaTouchMove( event );"' +
732
' ontouchcancel="wppaTouchCancel( event );" ' +
733
' style="' +
734
'border-width:' + wppaOvlBorderWidth + 'px ' + wppaOvlBorderWidth + 'px 0;' +
735
'border-style:solid;' +
@@ -759,6 +765,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx, 'force' );
759
' ontouchend="wppaTouchEnd( event );"' +
760
' ontouchmove="wppaTouchMove( event );"' +
761
' ontouchcancel="wppaTouchCancel( event );"' +
762
' src="'+wppaOvlUrls[idx]+'"' +
763
' style="' +
764
'border-width:' + wppaOvlBorderWidth + 'px ' + wppaOvlBorderWidth + 'px 0;' +
@@ -1555,4 +1562,18 @@ function wppaShowFsButtons(opac) {
1555
}
1556
}
1557
1558
wppaConsoleLog( 'wppa-lightbox.js version '+wppaLightboxVersion+' loaded.', 'force' );
3
// Conatins lightbox modules
4
// Dependancies: wppa.js and default wp jQuery library
5
//
6
+ var wppaLightboxVersion = '7.2.02';
7
8
// Global inits
9
var wppaNormsBtnOpac = 0.75;
19
var wppaOvlActivePanorama = 0;
20
var wppaOvlHasPanoramas = false;
21
var wppaGlobalOvlPanoramaId = 0;
22
+ var wppaOvlBrowseOnClick = false;
23
24
// Global size specs
25
var wppaSavedContainerWidth = 0;
497
' ontouchend="wppaTouchEnd( event );"' +
498
' ontouchmove="wppaTouchMove( event );"' +
499
' ontouchcancel="wppaTouchCancel( event );"' +
500
+ ' onclick="wppaOvlImgClick( event );"' +
501
' onpause="wppaOvlVideoPlaying = false;"' +
502
' onplay="wppaOvlVideoPlaying = true;"' +
503
' style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;"' +
529
' ontouchend="wppaTouchEnd( event );"' +
530
' ontouchmove="wppaTouchMove( event );"' +
531
' ontouchcancel="wppaTouchCancel( event );"' +
532
+ ' onclick="wppaOvlImgClick( event );"' +
533
' style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;"' +
534
' alt="'+wppaOvlAlts[idx]+'"' +
535
' >'+
555
' ontouchend="wppaTouchEnd( event );"'+
556
' ontouchmove="wppaTouchMove( event );"'+
557
' ontouchcancel="wppaTouchCancel( event );"'+
558
+ ' onclick="wppaOvlImgClick( event );"' +
559
' src="'+wppaOvlUrls[idx]+'"'+
560
' style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;"'+
561
' alt="'+wppaOvlAlts[idx]+'"'+
699
' ontouchend="wppaTouchEnd( event );"' +
700
' ontouchmove="wppaTouchMove( event );"' +
701
' ontouchcancel="wppaTouchCancel( event );" ' +
702
+ ' onclick="wppaOvlImgClick( event );"' +
703
' controls' +
704
' style="' +
705
'border-width:' + wppaOvlBorderWidth + 'px ' + wppaOvlBorderWidth + 'px 0;' +
735
' ontouchend="wppaTouchEnd( event );"' +
736
' ontouchmove="wppaTouchMove( event );"' +
737
' ontouchcancel="wppaTouchCancel( event );" ' +
738
+ ' onclick="wppaOvlImgClick( event );"' +
739
' style="' +
740
'border-width:' + wppaOvlBorderWidth + 'px ' + wppaOvlBorderWidth + 'px 0;' +
741
'border-style:solid;' +
765
' ontouchend="wppaTouchEnd( event );"' +
766
' ontouchmove="wppaTouchMove( event );"' +
767
' ontouchcancel="wppaTouchCancel( event );"' +
768
+ ' onclick="wppaOvlImgClick( event );"' +
769
' src="'+wppaOvlUrls[idx]+'"' +
770
' style="' +
771
'border-width:' + wppaOvlBorderWidth + 'px ' + wppaOvlBorderWidth + 'px 0;' +
1562
}
1563
}
1564
1565
+ // Click on image
1566
+ function wppaOvlImgClick( event ) {
1567
+
1568
+ if ( wppaOvlBrowseOnClick ) {
1569
+ if ( event.screenX < ( screen.width / 2 ) ) {
1570
+ wppaOvlShowPrev();
1571
+ }
1572
+ else {
1573
+ wppaOvlShowNext();
1574
+ }
1575
+
1576
+ }
1577
+ }
1578
+
1579
wppaConsoleLog( 'wppa-lightbox.js version '+wppaLightboxVersion+' loaded.', 'force' );
js/wppa-lightbox.min.js CHANGED
@@ -1 +1 @@
1
- var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaRenderer,wppaScene,wppaCamera,wppaSphere,wppaSphereMaterial,wppaSphereMesh,wppaLightboxVersion="7.2.01",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaOvlActivePanorama=0,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;e=(a=null==p?event.keyCode:p.keyCode,27);var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"d":jQuery("#wppa-ovl-legenda-1").css("visibility","hidden"),jQuery("#wppa-ovl-legenda-2").css("visibility","hidden"),wppaShowLegenda="hidden";break;case"f":wppaOvlFull();break;case"l":wppaOvlNorm();break;case"q":case"x":wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(p){wppaConsoleLog("wppaOvlFull"),wppaNormsBtnOpac=.75;var a=wppaOvlMode;p||wppaOvlStepMode();var e=document.getElementById("wppa-overlay-ic");e&&(!p&&"normal"!=a||(e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},30),jQuery("#wppa-ovl-legenda-1").html(""))}function wppaOvlNorm(p){wppaConsoleLog("wppaOvlNorm"),wppaOvlMode="normal",wppaNormsBtnOpac=.75,document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),p?wppaOvlMode=wppaOvlModeInitial:(setTimeout(function(){wppaShowFsButtons(.75)},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlShow(p){var a,e;if(wppaConsoleLog("wppaOvlShow arg="+p),0<wppaOvlActivePanorama?jQuery("#wppa-overlay-ic").css({top:0,left:0}):jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%"}),wppaOvlFirst&&(jQuery("#weaver-final").removeClass("wvr-hide-bang"),jQuery("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaKbHandlerInstalled||(jQuery(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),jQuery("#wppa-overlay-bg").css({width:window.innerWidth,height:window.innerHeight}),"normal"!=wppaOvlModeInitial&&wppaOvlFull(!0)),"object"==typeof p){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var t=(p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(t[1]){var o,l,i=t[1],n=jQuery("a"),r=0;for(l=0;l<n.length;l++)o=n[l],1<(t=!!jQuery(o).attr("data-rel")&&jQuery(o).attr("data-rel").split("[")).length&&"wppa"==t[0]&&t[1]==i&&(wppaOvlUrls[r]=o.href,jQuery(o).attr("data-lbtitle")?wppaOvlTitles[r]=wppaRepairScriptTags(jQuery(o).attr("data-lbtitle")):wppaOvlTitles[r]=wppaRepairScriptTags(o.title),wppaOvlIds[r]=jQuery(o).attr("data-id")?jQuery(o).attr("data-id"):"0",wppaOvlAlts[r]=jQuery(o).attr("data-alt")?jQuery(o).attr("data-alt"):"",wppaOvlVideoHtmls[r]=jQuery(o).attr("data-videohtml")?decodeURI(jQuery(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[r]=jQuery(o).attr("data-pdfhtml")?decodeURI(jQuery(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[r]=jQuery(o).attr("data-audiohtml")?decodeURI(jQuery(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[r]=jQuery(o).attr("data-videonatwidth")?jQuery(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[r]=jQuery(o).attr("data-videonatheight")?jQuery(o).attr("data-videonatheight"):"",0<(a=jQuery(o).attr("data-panorama")?jQuery(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[r]=a.substr(e+1),wppaOvlPanoramaIds[r]=a.substr(0,e)):(wppaOvlPanoramaHtml[r]="",wppaOvlPanoramaIds[r]=0),decodeURI(jQuery(o).attr("data-pdfhtml"))==decodeURI(jQuery(p).attr("data-pdfhtml"))&&decodeURI(jQuery(o).attr("data-videohtml"))==decodeURI(jQuery(p).attr("data-videohtml"))&&decodeURI(jQuery(o).attr("data-audiohtml"))==decodeURI(jQuery(p).attr("data-audiohtml"))&&o.href==p.href&&(wppaOvlIdx=r,wppaConsoleLog("Found "+r+": "+p.href,"force")),r++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlIds[0]=jQuery(p).attr("data-id")?jQuery(p).attr("data-id"):"0",wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=jQuery(p).attr("data-pdfhtml")?decodeURI(jQuery(p).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",0<(a=jQuery(p).attr("data-panorama")?jQuery(p).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[0]=a.substr(e+1),wppaOvlPanoramaIds[0]=a.substr(0,e)):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0),wppaOvlIdx=0}else wppaOvlIdx=p;wppaOvlOpen=!0,setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(p){if(wppaConsoleLog("_wppaOvlShow, idx="+p,"force"),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[p],0<wppaOvlUrls[p].length&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaIsIe&&!wppaOvlImgs[p].complete&&wppaOvlOpen))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",500);var a,e;if(a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,""==wppaOvlVideoHtmls[a]&&wppaOvlOpen&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading > "+(a+1))),!wppaOvlRunning&&wppaOvlOpen&&(e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[e]&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e],wppaConsoleLog("Preloading < "+(e+1)))),_bumpViewCount(wppaOvlIds[p]),wppaOvlIsSingle=1==wppaOvlUrls.length,0<wppaOvlPanoramaIds[p]?(wppaOvlActivePanorama=wppaOvlPanoramaIds[p],jQuery("#wppa-overlay-ic").css({top:0,left:0})):(wppaOvlActivePanorama=0,jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%",display:"block"})),"normal"!=wppaOvlMode||wppaOvlActivePanorama){wppaOvlActivePanorama?(l=wppaOvlPanoramaHtml[p]+"<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >",wppaOvlShowLegenda&&"normal"!=wppaOvlMode&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode=fullscreen. '+(wppaOvlIsSingle?wppaOvlFullLegendaSinglePanorama:wppaOvlFullLegendaPanorama)+"</div>")):(wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[p]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+"\" ></iframe><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >":(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" src="'+wppaOvlUrls[p]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),l+="<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >"),wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>")),l+="</div>";var t=(wppaIsMobile,"0.1");return l+='<div id="wppa-exit-btn" style="height:'+wppaOvlFsExitBtnSize+"px;z-index:100098;position:fixed;top:0;right:0;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlHide()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>","normal"!=wppaOvlMode&&(l+='<div id="wppa-norms-btn" style="height:48px;z-index:100098;position:fixed;top:0;right:'+wppaOvlFsExitBtnSize+"px;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlNorm()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit-Full-Screen",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),jQuery("#wppa-overlay-ic").html(l)),0<wppaOvlPanoramaIds[p]&&wppaOvlIsSingle&&jQuery(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",10),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaShowFsButtons(),!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);var o="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(o=wppaOvlFontColor);wppaOvlUrls.length;jQuery("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" 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 );" 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 );" src="'+wppaOvlUrls[p]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),wppaOvlIsVideo=!1),!wppaOvlShowStartStop||wppaOvlIsSingle||wppaIsVideo||wppaOvlIsPdf||(l+='<div id="wppa-ovl-start-stop-btn" class="wppa-ovl-nav-btn" style="z-index:100101;position:absolute;top:50%;margin-top:-24px;left:50%;margin-left:-24px;'+(-1==wppaOvlIdx?"visibility:hidden;":"")+"box-shadow:none;"+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlStartStop()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button",wppaOvlIconSize,!0,!0,"0","20","50","50")+"</div>"),wppaOvlIsSingle||(l+='<div id="wppa-ovl-prev-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;left:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowPrev()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+"</div>",l+='<div id="wppa-ovl-next-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;right:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowNext()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</div>"),l+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+o+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >'+(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p]+"</div>",jQuery("#wppa-overlay-ic").html(l),wppaShowFsButtons(),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),0==wppaOvlPanoramaIds[p]&&wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),!1}function wppaOvlSize(p){if(wppaConsoleLog("wppaOvlSize"),!wppaOvlActivePanorama){var a=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(a&&e&&"none"!=jQuery("#wppa-overlay-bg").css("display")){if("normal"==wppaOvlMode){var t,o,l,i,n,r,w,d=wppaWindowWidth(),v=wppaWindowHeight();l=wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(t=.9*wppaWindowWidth(),o=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t=a.clientWidth,o=a.naturalWidth,a.naturalHeight),void 0===o&&(o=a.clientWidth,l=a.clientHeight),(r=(i=(d-3*wppaOvlBorderWidth)/o)<(n=v/l)?i:n)<1&&(o=parseInt(o*r),l=parseInt(l*r));var s=jQuery("#wppa-overlay-txt").height();w="auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),v-s-20-2*wppaOvlBorderWidth):v-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(w*o/l),h=(wppaOvlPadTop,parseInt((d-u)/2),u);l<w&&(wppaOvlPadTop+(w-l)/2,parseInt((d-o)/2),h=o);var O=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(l=180,O=!(o=h=240)),h=parseInt(h),wppaSavedImageWidth=parseInt(h),wppaSavedImageHeight=parseInt(h*l/o),wppaSavedMarginLeft=-parseInt(h/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(h+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),jQuery("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),O?(jQuery("#wppa-ovl-spin").hide(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):(setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),wppaConsoleLog("Not done "+wppaOvlIdx+" saved="+wppaSavedImageWidth+", wid="+h+", cw="+t+", nw="+o+", img complete="+document.getElementById("wppa-overlay-img").complete)),!0}wppaOvlFormatFull()}else wppaConsoleLog("Lb quitted","force")}}function wppaOvlFormatFull(){if(wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode),wppaOvlOpen&&!(0<wppaOvlActivePanorama)){var p,a,e;if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)p=document.getElementById("wppa-overlay-img"),a=screen.width,e=screen.height;else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout("wppaOvlFormatFull()",10);a=p.naturalWidth,e=p.naturalHeight}var t=screen.width/screen.height,o=a/e,l=0,i=0,n=0,r=0,w=0,d=0,v="hidden";switch(wppaOvlMode){case"padded":r=o<t?(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o):(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width);break;case"stretched":i=l=0,n=screen.height,r=screen.width;break;case"clipped":r=o<t?(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width):(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o);break;case"realsize":(l=(screen.width-a)/2)<0&&(d=parseInt(-l),l=0),(i=(screen.height-e)/2)<0&&(w=parseInt(-i),i=0),n=e,r=a,v="auto"}return l=parseInt(l),i=parseInt(i),n=parseInt(n),r=parseInt(r),jQuery(p).css({height:n,width:r,marginLeft:l,marginTop:i,left:0,top:0,maxWidth:1e4}),jQuery(p).css({visibility:"visible"}),jQuery("#wppa-ovl-full-bg").css({overflow:v}),jQuery("#wppa-ovl-full-bg").scrollTop(w),jQuery("#wppa-ovl-full-bg").scrollLeft(d),jQuery("#wppa-ovl-spin").hide(),!0}}function wppaOvlUpdateFsId(){wppaConsoleLog("wppaOvlUpdateFsId"),wppaOvlFsPhotoId=wppaPhotoId}function wppaOvlStartAudio(){wppaConsoleLog("wppaOvlStartAudio");var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&(p.play(),wppaConsoleLog("Audio play wppa-overlay-audio"))}function wppaOvlStepMode(){wppaConsoleLog("wppaOvlStepMode from "+wppaOvlMode);for(var p=new Array("normal","padded","stretched","clipped","realsize","padded"),a=0;a<p.length;){if(wppaOvlMode==p[a])return wppaOvlMode=p[a+1],void wppaOvlShow(wppaOvlIdx);a++}}function wppaOvlStartStop(){wppaConsoleLog("wppaOvlStartStop called. Running="+wppaOvlRunning),wppaOvlRunning?(wppaOvlRunning=!1,jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button",wppaOvlIconSize,!0,!0,"0","20","50","50")),-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&jQuery("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&jQuery("#wppa-ovl-next-btn").css("visibility","visible"))):(jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml((wppaOvlRunning,"Pause-Button"),wppaOvlIconSize,!0,!0,"0","20","50","50")),wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaConsoleLog("wppaOvlRun, running="+wppaOvlRunning),wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",50);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",50)}var a;a=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1,wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(a),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaConsoleLog("wppaOvlShowPrev"),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIsSingle||(wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1)),!1}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIsSingle||(wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1)),!1}function wppaOvlHide(){wppaConsoleLog("wppaOvlHide"),wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),jQuery("#wppa-overlay-ic").html(""),jQuery("#wppa-overlay-bg").fadeOut(300),jQuery(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,wppaNormsBtnOpac=.75,jQuery("#wppa-ovl-spin").hide(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),jQuery("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,wppaOvlOpen=!1}function wppaOvlOnclick(p){switch(wppaConsoleLog("wppaOvlOnClick"),wppaOvlOnclickType){case"none":break;case"close":"normal"==wppaOvlMode&&wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;48<p.clientY&&(a<screen.width/2?wppaOvlShowPrev():wppaOvlShowNext());break;default:alert("Unimplemented action: "+wppaOvlOnclickType)}return!0}function wppaInitOverlay(){wppaConsoleLog("wppaInitOverlay"),jQuery(".wp-caption").each(function(){var p=jQuery(this),a=p.find("IMG[alt]").attr("alt")||"",e=p.find(".wp-caption-text").html()||"",t=p.find("a"),o=a+"<br>"+e;t.attr("data-lbtitle")||t.attr("data-lbtitle",o)}),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var p,a,e=jQuery("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=wppaOvlCurIdx=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),a=0;a<e.length;a++)if(p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0])switch(wppaWppaOverlayActivated=!0,jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaMagnifierCursor){case"pointer":jQuery(p).css("cursor","pointer");break;case"":jQuery(p).css("cursor","default");break;default:jQuery(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange)}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",100))}function wppaShowFsButtons(p){void 0!==p&&(wppaNormsBtnOpac=p),jQuery("#wppa-exit-btn").stop().fadeTo(3,wppaNormsBtnOpac),"normal"==wppaOvlMode?jQuery("#wppa-fulls-btn").stop().fadeTo(3,wppaNormsBtnOpac):jQuery("#wppa-norms-btn").stop().fadeTo(3,wppaNormsBtnOpac)}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()}),wppaConsoleLog("wppa-lightbox.js version "+wppaLightboxVersion+" loaded.","force");
1
+ var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaRenderer,wppaScene,wppaCamera,wppaSphere,wppaSphereMaterial,wppaSphereMesh,wppaLightboxVersion="7.2.02",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaOvlActivePanorama=0,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;e=(a=null==p?event.keyCode:p.keyCode,27);var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"d":jQuery("#wppa-ovl-legenda-1").css("visibility","hidden"),jQuery("#wppa-ovl-legenda-2").css("visibility","hidden"),wppaShowLegenda="hidden";break;case"f":wppaOvlFull();break;case"l":wppaOvlNorm();break;case"q":case"x":wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(p){wppaConsoleLog("wppaOvlFull"),wppaNormsBtnOpac=.75;var a=wppaOvlMode;p||wppaOvlStepMode();var e=document.getElementById("wppa-overlay-ic");e&&(!p&&"normal"!=a||(e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},30),jQuery("#wppa-ovl-legenda-1").html(""))}function wppaOvlNorm(p){wppaConsoleLog("wppaOvlNorm"),wppaOvlMode="normal",wppaNormsBtnOpac=.75,document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),p?wppaOvlMode=wppaOvlModeInitial:(setTimeout(function(){wppaShowFsButtons(.75)},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlShow(p){var a,e;if(wppaConsoleLog("wppaOvlShow arg="+p),0<wppaOvlActivePanorama?jQuery("#wppa-overlay-ic").css({top:0,left:0}):jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%"}),wppaOvlFirst&&(jQuery("#weaver-final").removeClass("wvr-hide-bang"),jQuery("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaKbHandlerInstalled||(jQuery(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),jQuery("#wppa-overlay-bg").css({width:window.innerWidth,height:window.innerHeight}),"normal"!=wppaOvlModeInitial&&wppaOvlFull(!0)),"object"==typeof p){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var t=(p.rel?p.rel:!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(t[1]){var o,l,i=t[1],n=jQuery("a"),r=0;for(l=0;l<n.length;l++)o=n[l],1<(t=!!jQuery(o).attr("data-rel")&&jQuery(o).attr("data-rel").split("[")).length&&"wppa"==t[0]&&t[1]==i&&(wppaOvlUrls[r]=o.href,jQuery(o).attr("data-lbtitle")?wppaOvlTitles[r]=wppaRepairScriptTags(jQuery(o).attr("data-lbtitle")):wppaOvlTitles[r]=wppaRepairScriptTags(o.title),wppaOvlIds[r]=jQuery(o).attr("data-id")?jQuery(o).attr("data-id"):"0",wppaOvlAlts[r]=jQuery(o).attr("data-alt")?jQuery(o).attr("data-alt"):"",wppaOvlVideoHtmls[r]=jQuery(o).attr("data-videohtml")?decodeURI(jQuery(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[r]=jQuery(o).attr("data-pdfhtml")?decodeURI(jQuery(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[r]=jQuery(o).attr("data-audiohtml")?decodeURI(jQuery(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[r]=jQuery(o).attr("data-videonatwidth")?jQuery(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[r]=jQuery(o).attr("data-videonatheight")?jQuery(o).attr("data-videonatheight"):"",0<(a=jQuery(o).attr("data-panorama")?jQuery(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[r]=a.substr(e+1),wppaOvlPanoramaIds[r]=a.substr(0,e)):(wppaOvlPanoramaHtml[r]="",wppaOvlPanoramaIds[r]=0),decodeURI(jQuery(o).attr("data-pdfhtml"))==decodeURI(jQuery(p).attr("data-pdfhtml"))&&decodeURI(jQuery(o).attr("data-videohtml"))==decodeURI(jQuery(p).attr("data-videohtml"))&&decodeURI(jQuery(o).attr("data-audiohtml"))==decodeURI(jQuery(p).attr("data-audiohtml"))&&o.href==p.href&&(wppaOvlIdx=r,wppaConsoleLog("Found "+r+": "+p.href,"force")),r++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlIds[0]=jQuery(p).attr("data-id")?jQuery(p).attr("data-id"):"0",wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=jQuery(p).attr("data-pdfhtml")?decodeURI(jQuery(p).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",0<(a=jQuery(p).attr("data-panorama")?jQuery(p).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[0]=a.substr(e+1),wppaOvlPanoramaIds[0]=a.substr(0,e)):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0),wppaOvlIdx=0}else wppaOvlIdx=p;wppaOvlOpen=!0,setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},1)}function _wppaOvlShow(p){if(wppaConsoleLog("_wppaOvlShow, idx="+p,"force"),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[p],0<wppaOvlUrls[p].length&&!wppaIsVideo&&(wppaOvlImgs[p]=new Image,wppaOvlImgs[p].src=wppaOvlUrls[p],wppaConsoleLog("Preloading "+(p+1)+"/"+wppaOvlUrls.length+" (current)"),!wppaIsIe&&!wppaOvlImgs[p].complete&&wppaOvlOpen))return wppaConsoleLog("Retrying preload current image"),void setTimeout("_wppaOvlShow("+p+")",500);var a,e;if(a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,""==wppaOvlVideoHtmls[a]&&wppaOvlOpen&&(wppaOvlImgs[a]=new Image,wppaOvlImgs[a].src=wppaOvlUrls[a],wppaConsoleLog("Preloading > "+(a+1))),!wppaOvlRunning&&wppaOvlOpen&&(e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1,""==wppaOvlVideoHtmls[e]&&(wppaOvlImgs[e]=new Image,wppaOvlImgs[e].src=wppaOvlUrls[e],wppaConsoleLog("Preloading < "+(e+1)))),_bumpViewCount(wppaOvlIds[p]),wppaOvlIsSingle=1==wppaOvlUrls.length,0<wppaOvlPanoramaIds[p]?(wppaOvlActivePanorama=wppaOvlPanoramaIds[p],jQuery("#wppa-overlay-ic").css({top:0,left:0})):(wppaOvlActivePanorama=0,jQuery("#wppa-overlay-ic").css({top:"50%",left:"50%",display:"block"})),"normal"!=wppaOvlMode||wppaOvlActivePanorama){wppaOvlActivePanorama?(l=wppaOvlPanoramaHtml[p]+"<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >",wppaOvlShowLegenda&&"normal"!=wppaOvlMode&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode=fullscreen. '+(wppaOvlIsSingle?wppaOvlFullLegendaSinglePanorama:wppaOvlFullLegendaPanorama)+"</div>")):(wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[p]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+"\" ></iframe><div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >":(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[p]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),l+="<div style=\"height: 20px; width: 100%; position:absolute; top:0; left:0;\" onmouseover=\"jQuery('#wppa-ovl-legenda-2').css('visibility','visible');\" onmouseout=\"jQuery('#wppa-ovl-legenda-2').css('visibility','hidden');wppaShowLegenda='hidden';\" >"),wppaOvlShowLegenda&&(l+='<div id="wppa-ovl-legenda-2" style="position:fixed; left:0; top:0; background-color:'+("black"==wppaOvlTheme?"#272727":"#a7a7a7")+"; color:"+("black"==wppaOvlTheme?"#a7a7a7":"#272727")+"; visibility:"+wppaShowLegenda+';" >Mode='+wppaOvlMode+". "+(wppaOvlIsSingle?wppaOvlFullLegendaSingle:wppaOvlFullLegenda)+"</div>")),l+="</div>";var t=(wppaIsMobile,"0.1");return l+='<div id="wppa-exit-btn" style="height:'+wppaOvlFsExitBtnSize+"px;z-index:100098;position:fixed;top:0;right:0;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlHide()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>","normal"!=wppaOvlMode&&(l+='<div id="wppa-norms-btn" style="height:48px;z-index:100098;position:fixed;top:0;right:'+wppaOvlFsExitBtnSize+"px;opacity:"+wppaNormsBtnOpac+';" onclick="wppaOvlNorm()" onmouseover="jQuery(this).stop().fadeTo(300,1);" ontouchstart="jQuery(this).stop().fadeTo(300,1);" onmouseout="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" ontouchend="jQuery(this).stop().fadeTo(300,'+t+");wppaNormsBtnOpac="+t+';" >'+wppaSvgHtml("Exit-Full-Screen",wppaOvlFsExitBtnSize+"px",!0,!0,"0","0","0","0")+"</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),jQuery("#wppa-overlay-ic").html(l)),0<wppaOvlPanoramaIds[p]&&wppaOvlIsSingle&&jQuery(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",10),wppaIsVideo||wppaHasAudio?setTimeout("wppaOvlUpdateFsId()",20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaShowFsButtons(),!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);var o="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(o=wppaOvlFontColor);wppaOvlUrls.length;jQuery("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[p]+' id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" ></iframe>':(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[p]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),wppaOvlIsVideo=!1),!wppaOvlShowStartStop||wppaOvlIsSingle||wppaIsVideo||wppaOvlIsPdf||(l+='<div id="wppa-ovl-start-stop-btn" class="wppa-ovl-nav-btn" style="z-index:100101;position:absolute;top:50%;margin-top:-24px;left:50%;margin-left:-24px;'+(-1==wppaOvlIdx?"visibility:hidden;":"")+"box-shadow:none;"+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlStartStop()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button",wppaOvlIconSize,!0,!0,"0","20","50","50")+"</div>"),wppaOvlIsSingle||(l+='<div id="wppa-ovl-prev-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;left:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowPrev()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+"</div>",l+='<div id="wppa-ovl-next-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;right:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowNext()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</div>"),l+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+o+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >'+(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p]+"</div>",jQuery("#wppa-overlay-ic").html(l),wppaShowFsButtons(),jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),0==wppaOvlPanoramaIds[p]&&wppaOvlResize(),wppaOvlFirst&&wppaShowFsButtons(),!1}function wppaOvlSize(p){if(wppaConsoleLog("wppaOvlSize"),!wppaOvlActivePanorama){var a=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(a&&e&&"none"!=jQuery("#wppa-overlay-bg").css("display")){if("normal"==wppaOvlMode){var t,o,l,i,n,r,w,d=wppaWindowWidth(),v=wppaWindowHeight();l=wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(t=.9*wppaWindowWidth(),o=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t=a.clientWidth,o=a.naturalWidth,a.naturalHeight),void 0===o&&(o=a.clientWidth,l=a.clientHeight),(r=(i=(d-3*wppaOvlBorderWidth)/o)<(n=v/l)?i:n)<1&&(o=parseInt(o*r),l=parseInt(l*r));var s=jQuery("#wppa-overlay-txt").height();w="auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),v-s-20-2*wppaOvlBorderWidth):v-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(w*o/l),h=(wppaOvlPadTop,parseInt((d-u)/2),u);l<w&&(wppaOvlPadTop+(w-l)/2,parseInt((d-o)/2),h=o);var c=wppaSavedImageWidth-h<3&&h-wppaSavedImageWidth<3;return h<=10&&(l=180,c=!(o=h=240)),h=parseInt(h),wppaSavedImageWidth=parseInt(h),wppaSavedImageHeight=parseInt(h*l/o),wppaSavedMarginLeft=-parseInt(h/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(h+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),jQuery("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),jQuery("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),c?(jQuery("#wppa-ovl-spin").hide(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):(setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),wppaConsoleLog("Not done "+wppaOvlIdx+" saved="+wppaSavedImageWidth+", wid="+h+", cw="+t+", nw="+o+", img complete="+document.getElementById("wppa-overlay-img").complete)),!0}wppaOvlFormatFull()}else wppaConsoleLog("Lb quitted","force")}}function wppaOvlFormatFull(){if(wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode),wppaOvlOpen&&!(0<wppaOvlActivePanorama)){var p,a,e;if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)p=document.getElementById("wppa-overlay-img"),a=screen.width,e=screen.height;else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout("wppaOvlFormatFull()",10);a=p.naturalWidth,e=p.naturalHeight}var t=screen.width/screen.height,o=a/e,l=0,i=0,n=0,r=0,w=0,d=0,v="hidden";switch(wppaOvlMode){case"padded":r=o<t?(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o):(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width);break;case"stretched":i=l=0,n=screen.height,r=screen.width;break;case"clipped":r=o<t?(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,screen.width):(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,screen.height*o);break;case"realsize":(l=(screen.width-a)/2)<0&&(d=parseInt(-l),l=0),(i=(screen.height-e)/2)<0&&(w=parseInt(-i),i=0),n=e,r=a,v="auto"}return l=parseInt(l),i=parseInt(i),n=parseInt(n),r=parseInt(r),jQuery(p).css({height:n,width:r,marginLeft:l,marginTop:i,left:0,top:0,maxWidth:1e4}),jQuery(p).css({visibility:"visible"}),jQuery("#wppa-ovl-full-bg").css({overflow:v}),jQuery("#wppa-ovl-full-bg").scrollTop(w),jQuery("#wppa-ovl-full-bg").scrollLeft(d),jQuery("#wppa-ovl-spin").hide(),!0}}function wppaOvlUpdateFsId(){wppaConsoleLog("wppaOvlUpdateFsId"),wppaOvlFsPhotoId=wppaPhotoId}function wppaOvlStartAudio(){wppaConsoleLog("wppaOvlStartAudio");var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&(p.play(),wppaConsoleLog("Audio play wppa-overlay-audio"))}function wppaOvlStepMode(){wppaConsoleLog("wppaOvlStepMode from "+wppaOvlMode);for(var p=new Array("normal","padded","stretched","clipped","realsize","padded"),a=0;a<p.length;){if(wppaOvlMode==p[a])return wppaOvlMode=p[a+1],void wppaOvlShow(wppaOvlIdx);a++}}function wppaOvlStartStop(){wppaConsoleLog("wppaOvlStartStop called. Running="+wppaOvlRunning),wppaOvlRunning?(wppaOvlRunning=!1,jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button",wppaOvlIconSize,!0,!0,"0","20","50","50")),-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&jQuery("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&jQuery("#wppa-ovl-next-btn").css("visibility","visible"))):(jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml((wppaOvlRunning,"Pause-Button"),wppaOvlIconSize,!0,!0,"0","20","50","50")),wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaConsoleLog("wppaOvlRun, running="+wppaOvlRunning),wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",50);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",50)}var a;a=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1,wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(a),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaConsoleLog("wppaOvlShowPrev"),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIsSingle||(wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1)),!1}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIsSingle||(wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1)),!1}function wppaOvlHide(){wppaConsoleLog("wppaOvlHide"),wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),jQuery("#wppa-overlay-ic").html(""),jQuery("#wppa-overlay-bg").fadeOut(300),jQuery(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,wppaNormsBtnOpac=.75,jQuery("#wppa-ovl-spin").hide(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),jQuery("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,wppaOvlOpen=!1}function wppaOvlOnclick(p){switch(wppaConsoleLog("wppaOvlOnClick"),wppaOvlOnclickType){case"none":break;case"close":"normal"==wppaOvlMode&&wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;48<p.clientY&&(a<screen.width/2?wppaOvlShowPrev():wppaOvlShowNext());break;default:alert("Unimplemented action: "+wppaOvlOnclickType)}return!0}function wppaInitOverlay(){wppaConsoleLog("wppaInitOverlay"),jQuery(".wp-caption").each(function(){var p=jQuery(this),a=p.find("IMG[alt]").attr("alt")||"",e=p.find(".wp-caption-text").html()||"",t=p.find("a"),o=a+"<br>"+e;t.attr("data-lbtitle")||t.attr("data-lbtitle",o)}),""==wppaOvlMode&&(wppaOvlMode=wppaOvlModeInitial);var p,a,e=jQuery("a"),t=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=wppaOvlCurIdx=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),a=0;a<e.length;a++)if(p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0])switch(wppaWppaOverlayActivated=!0,jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaMagnifierCursor){case"pointer":jQuery(p).css("cursor","pointer");break;case"":jQuery(p).css("cursor","default");break;default:jQuery(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange)}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",100))}function wppaShowFsButtons(p){void 0!==p&&(wppaNormsBtnOpac=p),jQuery("#wppa-exit-btn").stop().fadeTo(3,wppaNormsBtnOpac),"normal"==wppaOvlMode?jQuery("#wppa-fulls-btn").stop().fadeTo(3,wppaNormsBtnOpac):jQuery("#wppa-norms-btn").stop().fadeTo(3,wppaNormsBtnOpac)}function wppaOvlImgClick(p){wppaOvlBrowseOnClick&&(p.screenX<screen.width/2?wppaOvlShowPrev():wppaOvlShowNext())}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()}),wppaConsoleLog("wppa-lightbox.js version "+wppaLightboxVersion+" loaded.","force");
js/wppa.js CHANGED
@@ -2,7 +2,7 @@
2
//
3
// contains common vars and functions
4
//
5
- var wppaJsVersion = '7.2.01';
6
7
// Language dependant vars. i18n for js does not work. Values are filled in by wppa_add_page_specific_urls_and_language() in wppa-non-admin.php
8
var wppaSlideShow;
@@ -635,6 +635,22 @@ function _wppaDoAutocol( mocc, i ) {
635
}
636
}
637
638
// Thumbframes default
639
if ( wppaThumbSpaceAuto ) {
640
var tfw = parseInt( jQuery( ".thumbnail-frame-"+mocc ).css('width') );
2
//
3
// contains common vars and functions
4
//
5
+ var wppaJsVersion = '7.2.02';
6
7
// Language dependant vars. i18n for js does not work. Values are filled in by wppa_add_page_specific_urls_and_language() in wppa-non-admin.php
8
var wppaSlideShow;
635
}
636
}
637
638
+ // Grid covers. set container linheight to 0
639
+ var isGrid = jQuery( '.wppa-album-cover-grid-'+mocc ).length;
640
+
641
+ if ( isGrid > 0 ) {
642
+
643
+ // Set container linheight to 0
644
+ jQuery('#wppa-container-'+mocc).css( 'line-height', '0' );
645
+
646
+ // Calculate width
647
+ var nItems = parseInt( ( w / wppaMaxCoverWidth ) + 0.9999 );
648
+ if ( nItems < 1 ) nItems = 1;
649
+
650
+ // Set widths
651
+ jQuery( '.wppa-album-cover-grid-'+mocc ).css( {width:(100/nItems)+'%'} );
652
+ }
653
+
654
// Thumbframes default
655
if ( wppaThumbSpaceAuto ) {
656
var tfw = parseInt( jQuery( ".thumbnail-frame-"+mocc ).css('width') );
js/wppa.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsVersion="7.2.01",wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaThumbnailAreaDelta;if(!wppaAutoColumnWidth)var wppaAutoColumnWidth=[];if(!wppaAutoColumnFrac)var wppaAutoColumnFrac=[];var wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0;if(!wppaColWidth)var wppaColWidth=[];if(!wppaMCRWidth)var wppaMCRWidth=[];var wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,_wppaId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light";function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize scroll wheel",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("resize scroll wheel",wppaMakeLazyVisible),jQuery(window).trigger("resize"),wppaProtect()}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var a=jQuery(window).height(),e=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:a*e})})}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",wppaSizeAutoDiv)});var wppaDoAllAutocolsLastI=0;function wppaDoAllAutocols(p){if("number"!=typeof p?p=1:p++,!(p<=wppaDoAllAutocolsLastI)){wppaDoAllAutocolsLastI=p,wppaConsoleLog("Doing wppaDoAllAutocols("+p+")");for(var a=1;a<=wppaAutoColumnWidth.length;)wppaAutoColumnWidth[a]&&_wppaDoAutocol(a,p),a++;return wppaMakeLazyVisible(),(p<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){wppaDoAllAutocols(p)},wppaExtendedResizeDelay),!0}wppaDoAllAutocolsLastI=0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var a,e,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,e=0;e<3;)1==++e&&0!=p||(a=document.getElementById(t[e]))&&"function"==typeof a.pause&&(a.pause(),wppaConsoleLog("Video "+t[e]+" paused","force"))}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var a=jQuery("audio");if(0<a.length)for(var e=0;e<a.length;)"wppa"==jQuery(a[e]).attr("data-from")&&a[e].pause(),e++}}function wppaMakeFullsizeUrl(p){var a,e;p=(a=(p=p.replace("/thumbs/","/")).split("//"))[1]?(e=a[1].split("/"),a[0]+"//"):(e=a[0].split("/"),"");for(var t=0;t<e.length;){var o=e[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var a=document.getElementById("wppa-container-"+p),e=0;if(!wppaAutoColumnWidth[p])return a.clientWidth;for(;0==e;)a=a.parentNode,e=jQuery(a).width();return parseInt(e*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p,a){if(wppaConsoleLog("Enter auto. mocc = "+p+" retry = "+a),!wppaAutoColumnWidth[p])return!0;var e,t;if(e=jQuery("#wppa-container-"+p).width(),wppaCoverImageResponsive[p]||1<(t=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(t[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:e-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:e})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:e-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:e},wppaResponseSpeed))),1<(t=jQuery(".wppa-cover-box-mcr-"+p)).length){var o=document.getElementById("wppa-albumlist-"+p).clientWidth,r=parseInt((o+8)/(wppaMaxCoverWidth+8))+1,s=r-1,i=parseInt((o+8)/r-8);if(wppaColWidth[p]!=o||wppaMCRWidth[p]!=i){wppaColWidth[p]=o,wppaMCRWidth[p]=i;for(var n=0;n<t.length;){switch(n%r){case 0:jQuery(t[n]).css({marginLeft:"0px",clear:"both",float:"left"});break;case s:jQuery(t[n]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(t[n]).css({marginLeft:"8px",clear:"none",float:"left"})}n++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:i-wppaTextFrameDelta},wppaResponseSpeed),jQuery(t[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:i},wppaResponseSpeed)}}else if(1==t.length)if(wppaCoverImageResponsive[p]);else{jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:e-wppaTextFrameDelta},wppaResponseSpeed);jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})}if(wppaThumbSpaceAuto){var w=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(w){var l=wppaMinThumbSpace,u=e-wppaThumbnailAreaDelta-7,c=Math.max(1,parseInt(u/(w+l))),d=parseInt(.5+(u-c*w)/(c+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:d})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",e-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",e-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var y,m=1,h=jQuery("#wppa-mas-h-"+m+"-"+p).attr("data-height-perc");h;)y=h*(e-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),wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",e-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*e),wppaFilmStripLength[p]=e-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",e),jQuery(".wppa-simg-"+p).css("width",e-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",e+10),jQuery(".wppa-mimg-"+p).css("width",e),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(e/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*e),!0}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var a=jQuery(".wppa-mas-h-"+p),e=wppaMinThumbSpace,t=0;t<a.length;t++){var o=wppaGetChildI(a[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+e;jQuery(a[t]).css({width:r})}}}function wppaGetChildI(p){var a,e=p.childNodes;for(a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var a=1;a<=wppaMaxOccur;)wppaStartHtml[a]=jQuery("#wppa-container-"+a).html(),a++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,a){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(a),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,a)):(setTimeout("wppaFotomotoToolbar( "+p+',"'+a+'" )',200),wppaConsoleLog("Waiting for Fotomoto")))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var a=["?","&","#","/",'"',"'"],e=0;e<a.length;){if(-1!=p.indexOf(a[e]))return!0;e++}return!1}function wppaPushStateSlide(p,a,e){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=e)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:a},"---",e),wppaConsoleLog("Slide history stack updated")}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace("&quot;",'"').replace('"]','">').replace("[/a]","</a>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var a=0;if(wppaCanPushState){if(p.state)switch(a=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+a).html(p.state.html);break;case"slide":_wppaGoto(a,p.state.slide)}else if(wppaUpdateAddressLine){if(a=wppaFirstOccur,jQuery("#wppa-container-"+a).html(wppaStartHtml[a]),(wppaFirstOccur=0)==a){var e=document.location.href.split("&wppa-occur=");a=parseInt(e[1])}e=document.location.href.split("&wppa-photo=");var t=parseInt(e[1]);if(0<t){for(var o=0;o<_wppaId[a].length&&_wppaId[a][o]!=t;)o++;o<_wppaId[a].length&&_wppaGoto(a,o)}}document.getElementById("theslide0-"+a)&&_wppaStop(a)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,a){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=a;else if(p.selectionStart||"0"==p.selectionStart){var e=p.selectionStart,t=p.selectionEnd;p.value=p.value.substring(0,e)+a+p.value.substring(t,p.value.length),p.selectionStart=e+a.length,p.selectionEnd=e+a.length}else p.value+=a}function wppaGeoInit(p,a,e){var t=new google.maps.LatLng(a,e),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:t},r=new google.maps.Map(document.getElementById("map-canvas-"+p),o),s=new google.maps.Marker({position:t,map:r,title:""});google.maps.event.addListener(r,"center_changed",function(){window.setTimeout(function(){r.panTo(s.getPosition())},1e3)})}function wppaEncode(p){var a;if(void 0!==p){var e=(a=(a=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),t=0;for(a="";t<e.length;)a+=e[t],++t<e.length&&(a+="||PLUS||");return a}}function wppaUrlToId(p){var a=p.split("/wppa/");return 1==a.length&&(a=p.split("/upload/")),1==a.length?0:a=(a=(a=(a=(a=(a=(a=a[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,a){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var e=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(e){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var s=jQuery(".wppa-ss-albumcat-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");s=jQuery(".wppa-ss-albumtext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");s=jQuery(".wppa-ss-phototag-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var i;s=jQuery(".wppa-ss-phototext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}if(a){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+e+","+t+","+o+","+r,document.location.href=n}}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,a){var e=jQuery(p).length;6<e&&(e=6),e<2&&(e=2),jQuery(a).attr("size",e)}function wppaUpdateSearchRoot(p,a){for(var e=jQuery(".wppa-search-root"),t=0;t<e.length;)jQuery(e[t]).html(p),t++;for(e=jQuery(".wppa-rootbox"),t=0;t<e.length;)a?(jQuery(e[t]).prop("checked",!1),jQuery(e[t]).prop("disabled",!1)):(jQuery(e[t]).prop("checked",!0),jQuery(e[t]).prop("disabled",!0)),t++;for(e=jQuery(".wppa-search-root-id"),t=0;t<e.length;)jQuery(e[t]).val(a),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),a=0;a<p.length;)jQuery(p[a]).html(""),a++;for(p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).attr("disabled","disabled"),a++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).removeAttr("disabled"),a++}function wppaDisplaySelectedFiles(p){for(var a=jQuery("#"+p),e=0,t="";e<a[0].files.length;)t+=a[0].files[e].name+" ",e++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,a,e,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
1
+ var wppaJsVersion="7.2.02",wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaThumbnailAreaDelta;if(!wppaAutoColumnWidth)var wppaAutoColumnWidth=[];if(!wppaAutoColumnFrac)var wppaAutoColumnFrac=[];var wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0;if(!wppaColWidth)var wppaColWidth=[];if(!wppaMCRWidth)var wppaMCRWidth=[];var wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,_wppaId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light";function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize scroll wheel",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("resize scroll wheel",wppaMakeLazyVisible),jQuery(window).trigger("resize"),wppaProtect()}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var a=jQuery(window).height(),e=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:a*e})})}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll",wppaSizeAutoDiv)});var wppaDoAllAutocolsLastI=0;function wppaDoAllAutocols(p){if("number"!=typeof p?p=1:p++,!(p<=wppaDoAllAutocolsLastI)){wppaDoAllAutocolsLastI=p,wppaConsoleLog("Doing wppaDoAllAutocols("+p+")");for(var a=1;a<=wppaAutoColumnWidth.length;)wppaAutoColumnWidth[a]&&_wppaDoAutocol(a,p),a++;return wppaMakeLazyVisible(),(p<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){wppaDoAllAutocols(p)},wppaExtendedResizeDelay),!0}wppaDoAllAutocolsLastI=0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var a,e,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,e=0;e<3;)1==++e&&0!=p||(a=document.getElementById(t[e]))&&"function"==typeof a.pause&&(a.pause(),wppaConsoleLog("Video "+t[e]+" paused","force"))}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var a=jQuery("audio");if(0<a.length)for(var e=0;e<a.length;)"wppa"==jQuery(a[e]).attr("data-from")&&a[e].pause(),e++}}function wppaMakeFullsizeUrl(p){var a,e;p=(a=(p=p.replace("/thumbs/","/")).split("//"))[1]?(e=a[1].split("/"),a[0]+"//"):(e=a[0].split("/"),"");for(var t=0;t<e.length;){var o=e[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var a=document.getElementById("wppa-container-"+p),e=0;if(!wppaAutoColumnWidth[p])return a.clientWidth;for(;0==e;)a=a.parentNode,e=jQuery(a).width();return parseInt(e*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p,a){if(wppaConsoleLog("Enter auto. mocc = "+p+" retry = "+a),!wppaAutoColumnWidth[p])return!0;var e,t;if(e=jQuery("#wppa-container-"+p).width(),wppaCoverImageResponsive[p]||1<(t=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(t[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:e-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:e})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:e-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:e},wppaResponseSpeed))),1<(t=jQuery(".wppa-cover-box-mcr-"+p)).length){var o=document.getElementById("wppa-albumlist-"+p).clientWidth,r=parseInt((o+8)/(wppaMaxCoverWidth+8))+1,s=r-1,i=parseInt((o+8)/r-8);if(wppaColWidth[p]!=o||wppaMCRWidth[p]!=i){wppaColWidth[p]=o,wppaMCRWidth[p]=i;for(var n=0;n<t.length;){switch(n%r){case 0:jQuery(t[n]).css({marginLeft:"0px",clear:"both",float:"left"});break;case s:jQuery(t[n]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(t[n]).css({marginLeft:"8px",clear:"none",float:"left"})}n++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:i-wppaTextFrameDelta},wppaResponseSpeed),jQuery(t[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:i},wppaResponseSpeed)}}else if(1==t.length)if(wppaCoverImageResponsive[p]);else{jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:e-wppaTextFrameDelta},wppaResponseSpeed);jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})}if(0<jQuery(".wppa-album-cover-grid-"+p).length){jQuery("#wppa-container-"+p).css("line-height","0");var w=parseInt(e/wppaMaxCoverWidth+.9999);w<1&&(w=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/w+"%"})}if(wppaThumbSpaceAuto){var l=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(l){var u=wppaMinThumbSpace,c=e-wppaThumbnailAreaDelta-7,d=Math.max(1,parseInt(c/(l+u))),y=parseInt(.5+(c-d*l)/(d+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:y})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",e-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",e-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var m,h=1,f=jQuery("#wppa-mas-h-"+h+"-"+p).attr("data-height-perc");f;)m=f*(e-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+h+"-"+p).css("height",m),h++,f=jQuery("#wppa-mas-h-"+h+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",e-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*e),wppaFilmStripLength[p]=e-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",e),jQuery(".wppa-simg-"+p).css("width",e-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",e+10),jQuery(".wppa-mimg-"+p).css("width",e),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(e/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*e),!0}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var a=jQuery(".wppa-mas-h-"+p),e=wppaMinThumbSpace,t=0;t<a.length;t++){var o=wppaGetChildI(a[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+e;jQuery(a[t]).css({width:r})}}}function wppaGetChildI(p){var a,e=p.childNodes;for(a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var a=1;a<=wppaMaxOccur;)wppaStartHtml[a]=jQuery("#wppa-container-"+a).html(),a++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,a){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(a),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,a)):(setTimeout("wppaFotomotoToolbar( "+p+',"'+a+'" )',200),wppaConsoleLog("Waiting for Fotomoto")))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var a=["?","&","#","/",'"',"'"],e=0;e<a.length;){if(-1!=p.indexOf(a[e]))return!0;e++}return!1}function wppaPushStateSlide(p,a,e){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=e)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:a},"---",e),wppaConsoleLog("Slide history stack updated")}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace("&quot;",'"').replace('"]','">').replace("[/a]","</a>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var a=0;if(wppaCanPushState){if(p.state)switch(a=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+a).html(p.state.html);break;case"slide":_wppaGoto(a,p.state.slide)}else if(wppaUpdateAddressLine){if(a=wppaFirstOccur,jQuery("#wppa-container-"+a).html(wppaStartHtml[a]),(wppaFirstOccur=0)==a){var e=document.location.href.split("&wppa-occur=");a=parseInt(e[1])}e=document.location.href.split("&wppa-photo=");var t=parseInt(e[1]);if(0<t){for(var o=0;o<_wppaId[a].length&&_wppaId[a][o]!=t;)o++;o<_wppaId[a].length&&_wppaGoto(a,o)}}document.getElementById("theslide0-"+a)&&_wppaStop(a)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy?wppaConsoleLog("Fb Init busy"):"undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):(wppaConsoleLog("Fb wait"),setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,a){if(document.selection)p.focus(),sel=document.selection.createRange(),sel.text=a;else if(p.selectionStart||"0"==p.selectionStart){var e=p.selectionStart,t=p.selectionEnd;p.value=p.value.substring(0,e)+a+p.value.substring(t,p.value.length),p.selectionStart=e+a.length,p.selectionEnd=e+a.length}else p.value+=a}function wppaGeoInit(p,a,e){var t=new google.maps.LatLng(a,e),o={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:t},r=new google.maps.Map(document.getElementById("map-canvas-"+p),o),s=new google.maps.Marker({position:t,map:r,title:""});google.maps.event.addListener(r,"center_changed",function(){window.setTimeout(function(){r.panTo(s.getPosition())},1e3)})}function wppaEncode(p){var a;if(void 0!==p){var e=(a=(a=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),t=0;for(a="";t<e.length;)a+=e[t],++t<e.length&&(a+="||PLUS||");return a}}function wppaUrlToId(p){var a=p.split("/wppa/");return 1==a.length&&(a=p.split("/upload/")),1==a.length?0:a=(a=(a=(a=(a=(a=(a=a[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,a){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var e=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(e){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var s=jQuery(".wppa-ss-albumcat-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");s=jQuery(".wppa-ss-albumtext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");s=jQuery(".wppa-ss-phototag-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var i;s=jQuery(".wppa-ss-phototext-"+p);for(r="",i=0;i<s.length;i++)"selected"==jQuery(s[i]).attr("selected")&&(r+="."+jQuery(s[i]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}if(a){var n=jQuery("#wppa-ss-pageurl-"+p).val();-1==n.indexOf("?")?n+="?":n+="&",n+="occur=1&wppa-supersearch="+e+","+t+","+o+","+r,document.location.href=n}}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,a,e){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,a,e){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+e+", status = "+a,"force")},complete:function(p,a,e){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,a){var e=jQuery(p).length;6<e&&(e=6),e<2&&(e=2),jQuery(a).attr("size",e)}function wppaUpdateSearchRoot(p,a){for(var e=jQuery(".wppa-search-root"),t=0;t<e.length;)jQuery(e[t]).html(p),t++;for(e=jQuery(".wppa-rootbox"),t=0;t<e.length;)a?(jQuery(e[t]).prop("checked",!1),jQuery(e[t]).prop("disabled",!1)):(jQuery(e[t]).prop("checked",!0),jQuery(e[t]).prop("disabled",!0)),t++;for(e=jQuery(".wppa-search-root-id"),t=0;t<e.length;)jQuery(e[t]).val(a),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),a=0;a<p.length;)jQuery(p[a]).html(""),a++;for(p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).attr("disabled","disabled"),a++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),a=0;a<p.length;)jQuery(p[a]).removeAttr("disabled"),a++}function wppaDisplaySelectedFiles(p){for(var a=jQuery("#"+p),e=0,t="";e<a[0].files.length;)t+=a[0].files[e].name+" ",e++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,a,e,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}wppaConsoleLog("wppa.js version "+wppaJsVersion+" loaded.","force");
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
Contributors: opajaap
3
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
- Version: 7.2.01.004
6
- Stable tag: 7.2.00.008
7
Author: J.N. Breetvelt
8
Author URI: http://www.opajaap.nl/
9
Requires at least: 3.9
@@ -137,6 +137,10 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
137
138
== Upgrade Notice ==
139
140
= 7.2.01 =
141
142
* This version addresses various bug fixes and feature requests.
2
Contributors: opajaap
3
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US
4
Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
+ Version: 7.2.02.005
6
+ Stable tag: 7.2.01.004
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.2.02 =
141
+
142
+ * This version addresses various bug fixes and feature requests.
143
+
144
= 7.2.01 =
145
146
* This version addresses various bug fixes and feature requests.
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
/* wppa-ajax.php
3
*
4
* Functions used in ajax requests
5
- * Version 7.2.00
6
*
7
*/
8
@@ -3446,19 +3446,15 @@ global $wppa_log_file;
3446
break;
3447
case 'wppa_image_magick':
3448
$value = rtrim( $value, '/' );
3449
- $ok = true;
3450
- if ( $value ) {
3451
- $ok = false;
3452
- $files = wppa_glob( $value . '/*' );
3453
- if ( is_array( $files ) ) {
3454
- foreach ( $files as $file ) {
3455
- if ( basename( $file ) == 'convert' ) {
3456
- $ok = true;
3457
- }
3458
- }
3459
- }
3460
}
3461
- if ( ! $ok ) {
3462
wppa( 'error', '4713' );
3463
$alert .= __( 'This path does not contain ImageMagick commands', 'wp-photo-album-plus' );
3464
}
2
/* wppa-ajax.php
3
*
4
* Functions used in ajax requests
5
+ * Version 7.2.02
6
*
7
*/
8
3446
break;
3447
case 'wppa_image_magick':
3448
$value = rtrim( $value, '/' );
3449
+ $out = array();
3450
+ exec( escapeshellcmd( $value . '/convert' ), $out, $err );
3451
+ $ok = ( count( $out ) != 0 );
3452
+ if ( $ok ) {
3453
+ $out = array_reverse( $out );
3454
+ array_push( $out, 'Setting magick path returned:' );
3455
+ wppa_log( 'dbg', var_export( $out, true ) );
3456
}
3457
+ else {
3458
wppa( 'error', '4713' );
3459
$alert .= __( 'This path does not contain ImageMagick commands', 'wp-photo-album-plus' );
3460
}
wppa-album-covers.php CHANGED
@@ -3,7 +3,7 @@
3
* Package: wp-photo-album-plus
4
*
5
* Functions for album covers
6
- * Version 7.2.01
7
*
8
*/
9
@@ -68,6 +68,9 @@ function wppa_album_cover( $id ) {
68
}
69
wppa_album_cover_longdesc( $id, true );
70
break;
71
default:
72
$err = 'Unimplemented covertype: ' . $cover_type;
73
wppa_dbg_msg( $err );
@@ -806,9 +809,141 @@ global $wpdb;
806
wppa_toggle_alt();
807
}
808
809
// A single coverphoto
810
// Output goes directly to wppa_out()
811
- function wppa_the_coverphoto( $albumid, $image, $src, $photo_pos, $photolink, $title, $imgattr_a = array(), $events ) {
812
global $wpdb;
813
814
if ( ! $image ) {
@@ -819,12 +954,20 @@ global $wpdb;
819
$src = wppa_fix_poster_ext( $src, $image['id'] );
820
}
821
822
- $imgattr = isset( $imgattr_a['style'] ) ? $imgattr_a['style'] : '';
823
- $imgwidth = isset( $imgattr_a['width'] ) ? $imgattr_a['width'] : '';
824
- if ( ! $imgwidth ) $imgwidth = '0';
825
- $imgheight = isset( $imgattr_a['height'] ) ? $imgattr_a['height'] : '';
826
- if ( ! $imgheight ) $imgheight = '0';
827
- $frmwidth = $imgwidth + '10'; // + 2 * 1 border + 2 * 4 padding
828
829
// Find the posterurl if mm and exists
830
$thumburl = wppa_get_thumb_url( $image['id'] );
@@ -861,24 +1004,29 @@ global $wpdb;
861
}
862
}
863
else {
864
- switch ( $photo_pos ) {
865
- case 'left':
866
- $photoframestyle =
867
- 'style="float:left; margin-right:5px;width:' . $frmwidth . 'px;"';
868
- break;
869
- case 'right':
870
- $photoframestyle =
871
- 'style="float:right; margin-left:5px;width:' . $frmwidth . 'px;"';
872
- break;
873
- case 'top':
874
- $photoframestyle = 'style="text-align:center;"';
875
- break;
876
- case 'bottom':
877
- $photoframestyle = 'style="text-align:center;"';
878
- break;
879
- default:
880
- $photoframestyle = '';
881
- wppa_dbg_msg( 'Illegal $photo_pos in wppa_the_coverphoto' );
882
}
883
}
884
}
3
* Package: wp-photo-album-plus
4
*
5
* Functions for album covers
6
+ * Version 7.2.02
7
*
8
*/
9
68
}
69
wppa_album_cover_longdesc( $id, true );
70
break;
71
+ case 'grid':
72
+ wppa_album_cover_grid( $id );
73
+ break;
74
default:
75
$err = 'Unimplemented covertype: ' . $cover_type;
76
wppa_dbg_msg( $err );
809
wppa_toggle_alt();
810
}
811
812
+ // The cover type grid
813
+ function wppa_album_cover_grid( $id ) {
814
+ global $cover_count_key;
815
+ global $wpdb;
816
+
817
+ // Init
818
+ $album = wppa_cache_album( $id );
819
+ $alt = wppa( 'alt' );
820
+
821
+ // Find album details
822
+ $coverphoto = wppa_get_coverphoto_id( $id );
823
+ if ( ! $coverphoto ) return;
824
+ $image = wppa_cache_thumb( $coverphoto );
825
+ $photocount = wppa_get_photo_count( $id );
826
+ $albumcount = wppa_get_album_count( $id, 'use_treecounts' );
827
+ $mincount = wppa_get_mincount();
828
+
829
+ // Init links
830
+ $title = '';
831
+ $linkpage = '';
832
+ $href_title = '';
833
+ $onclick_title = '';
834
+
835
+ // See if there is substantial content to the album
836
+ $has_content = ( $albumcount > '0' ) || ( $photocount > $mincount );
837
+
838
+ // What is the albums title linktype
839
+ $linktype = $album['cover_linktype'];
840
+
841
+ // If not specified, use default
842
+ if ( ! $linktype ) {
843
+ $linktype = 'content';
844
+ }
845
+
846
+ // What is the albums title linkpage
847
+ $linkpage = $album['cover_linkpage'];
848
+
849
+ // Fix backward compatibility issue
850
+ if ( $linkpage == '-1' ) {
851
+ $linktype = 'none';
852
+ }
853
+
854
+ // Find the cover title href, onclick and title
855
+ $title_attr = wppa_get_album_title_attr_a( $id,
856
+ $linktype,
857
+ $linkpage,
858
+ $has_content,
859
+ $coverphoto,
860
+ $photocount
861
+ );
862
+ $href_title = $title_attr['href'];
863
+ $onclick_title = $title_attr['onclick'];
864
+ $title = $title_attr['title'];
865
+
866
+ // Find the coverphoto link
867
+ if ( $coverphoto ) {
868
+ $photolink = wppa_get_imglnk_a( 'coverimg',
869
+ $coverphoto,
870
+ $href_title,
871
+ $title,
872
+ $onclick_title,
873
+ '',
874
+ $id
875
+ );
876
+ }
877
+ else {
878
+ $photolink = false;
879
+ }
880
+
881
+ // Find the coverphoto details
882
+ $path = wppa_get_thumb_path( $coverphoto );
883
+ $imgattr_a = wppa_get_imgstyle_a( $coverphoto,
884
+ $path,
885
+ wppa_opt( 'smallsize' ),
886
+ '',
887
+ 'cover'
888
+ );
889
+ $src = wppa_get_thumb_url( $coverphoto,
890
+ true,
891
+ '',
892
+ $imgattr_a['width'],
893
+ $imgattr_a['height']
894
+ );
895
+
896
+ // Feed?
897
+ if ( is_feed() ) {
898
+ $events = '';
899
+ }
900
+ else {
901
+ $events = wppa_get_imgevents( 'cover' );
902
+ }
903
+
904
+ // Set up album cover style
905
+ $w = wppa_get_container_width();
906
+ if ( $w < 1 ) {
907
+ $w = $w * wppa_opt( 'initial_colwidth' );
908
+ }
909
+ $c = ceil( $w / wppa_opt( 'max_cover_width' ) );
910
+ $style = 'float:left;padding:0;width:' . (100/$c) . '%;margin:0;';
911
+
912
+ // Open the album box
913
+ wppa_out( '<div' .
914
+ ' id="album-' . $id . '-' . wppa( 'mocc' ) . '"' .
915
+ ' class="' .
916
+ 'wppa-album-cover-grid-' . wppa( 'mocc' ) . ' ' .
917
+ 'album ' .
918
+ 'wppa-box ' .
919
+ 'wppa-cover-box ' .
920
+ 'wppa-cover-box-' . wppa( 'mocc' ) . ' ' .
921
+ 'wppa-' . wppa( 'alt' ) .
922
+ '"' .
923
+ ' style="' . $style . wppa_wcs( 'wppa-cover-box' ) . '"' .
924
+ ' >'
925
+ );
926
+
927
+ // The Cover photo
928
+ wppa_the_coverphoto( $id,
929
+ $image,
930
+ $src,
931
+ 'left',
932
+ $photolink,
933
+ $title,
934
+ $imgattr_a,
935
+ $events,
936
+ true // is grid
937
+ );
938
+
939
+ // Close the album box
940
+ wppa_out( '</div>' );
941
+
942
+ }
943
+
944
// A single coverphoto
945
// Output goes directly to wppa_out()
946
+ function wppa_the_coverphoto( $albumid, $image, $src, $photo_pos, $photolink, $title, $imgattr_a = array(), $events, $is_grid = false ) {
947
global $wpdb;
948
949
if ( ! $image ) {
954
$src = wppa_fix_poster_ext( $src, $image['id'] );
955
}
956
957
+ if ( $is_grid ) {
958
+ $imgattr = 'width:100%;box-sizing:border-box;';
959
+ $imgwidth = '';
960
+ $imgheight = '';
961
+ $frmwidth = '100%;';
962
+ }
963
+ else {
964
+ $imgattr = isset( $imgattr_a['style'] ) ? $imgattr_a['style'] : '';
965
+ $imgwidth = isset( $imgattr_a['width'] ) ? $imgattr_a['width'] : '';
966
+ if ( ! $imgwidth ) $imgwidth = '0';
967
+ $imgheight = isset( $imgattr_a['height'] ) ? $imgattr_a['height'] : '';
968
+ if ( ! $imgheight ) $imgheight = '0';
969
+ $frmwidth = $imgwidth + '10'; // + 2 * 1 border + 2 * 4 padding
970
+ }
971
972
// Find the posterurl if mm and exists
973
$thumburl = wppa_get_thumb_url( $image['id'] );
1004
}
1005
}
1006
else {
1007
+ if ( $is_grid ) {
1008
+ $photoframestyle = 'style="width:100%;"';
1009
+ }
1010
+ else {
1011
+ switch ( $photo_pos ) {
1012
+ case 'left':
1013
+ $photoframestyle =
1014
+ 'style="float:left; margin-right:5px;width:' . $frmwidth . 'px;"';
1015
+ break;
1016
+ case 'right':
1017
+ $photoframestyle =
1018
+ 'style="float:right; margin-left:5px;width:' . $frmwidth . 'px;"';
1019
+ break;
1020
+ case 'top':
1021
+ $photoframestyle = 'style="text-align:center;"';
1022
+ break;
1023
+ case 'bottom':
1024
+ $photoframestyle = 'style="text-align:center;"';
1025
+ break;
1026
+ default:
1027
+ $photoframestyle = '';
1028
+ wppa_dbg_msg( 'Illegal $photo_pos in wppa_the_coverphoto' );
1029
+ }
1030
}
1031
}
1032
}
wppa-non-admin.php CHANGED
@@ -627,6 +627,7 @@ global $wppa_session;
627
wppaIsMobile = '.( wppa_is_mobile() ? 'true' : 'false' ).';
628
wppaOvlFsExitBtnSize = "'.wppa_opt( 'ovl_fsx_btn_size' ).'";
629
wppaOvlIconSize = "'.wppa_opt( 'nav_icon_size_lightbox' ).'px";
630
/* END Lightbox vars */
631
</script>
632
';
627
wppaIsMobile = '.( wppa_is_mobile() ? 'true' : 'false' ).';
628
wppaOvlFsExitBtnSize = "'.wppa_opt( 'ovl_fsx_btn_size' ).'";
629
wppaOvlIconSize = "'.wppa_opt( 'nav_icon_size_lightbox' ).'px";
630
+ wppaOvlBrowseOnClick = '.( wppa_switch( 'ovl_browse_on_click' ) ? 'true' : 'false' ).';
631
/* END Lightbox vars */
632
</script>
633
';
wppa-picture.php CHANGED
@@ -3,7 +3,7 @@
3
* Package: wp-photo-album-plus
4
*
5
* Make the picture html
6
- * Version 7.2.01
7
*
8
*/
9
@@ -28,1502 +28,1502 @@
28
//
29
function wppa_get_picture_html( $args ) {
30
31
- // Init
32
- $defaults = array( 'id' => '0',
33
- 'type' => '',
34
- 'class' => '',
35
- 'width' => false,
36
- 'height' => false,
37
- );
38
- $args = wp_parse_args( $args, $defaults );
39
-
40
- $id = strval( intval ( $args['id'] ) );
41
- $type = $args['type'];
42
- $class = $args['class'];
43
- $mocc = wppa( 'mocc' );
44
- if ( wppa_is_pdf( $id ) ) {
45
- $class = trim( $class . ' smxpdf-' . $mocc );
46
- $is_pdf = true;
47
- }
48
- else {
49
- $is_pdf = false; }
50
-
51
- // Check existance of required args
52
- foreach( array( 'id', 'type' ) as $item ) {
53
- if ( ! $args[$item] ) {
54
- wppa_dbg_msg( 'Missing ' . $item . ' in call to wppa_get_picture_html()', 'red' );
55
- return false;
56
- }
57
- }
58
-
59
- // Check validity of args
60
- if ( ! wppa_photo_exists( $id ) ) {
61
- wppa_dbg_msg( 'Photo ' . $id . ' does not exist in call to wppa_get_picture_html(). Type = ' . $type, 'red', 'force' );
62
- return false;
63
- }
64
- $types = array( 'sphoto', // Single image with optional border like slideshow border
65
- 'mphoto', // Media type like single image. Caption should be provided in wrappping div
66
- 'xphoto', // Like xphoto with extended features
67
- 'cover', // Album cover image
68
- 'thumb', // Normal tumbnail
69
- 'ttthumb', // Topten
70
- 'comthumb', // Comment widget
71
- 'fthumb', // Filmthumb
72
- 'twthumb', // Thumbnail widget
73
- 'ltthumb', // Lasten widget
74
- 'albthumb', // Album widget
75
- );
76
- if ( ! in_array( $type, $types ) ) {
77
- wppa_dbg_msg( 'Unimplemented type ' . $type . ' in call to wppa_get_picture_html()', 'red', 'force' );
78
- return false;
79
- }
80
-
81
- // Get other data
82
- $link = wppa_get_imglnk_a( $type, $id );
83
- $isthumb = strpos( $type, 'thumb' ) !== false;
84
- $file = $isthumb ? wppa_get_thumb_path( $id ) : wppa_get_photo_path( $id );
85
-
86
- if ( $args['width'] && $args['height'] ) {
87
- $href = $isthumb ? wppa_get_thumb_url( $id, true, '', $args['width'], $args['height'] ) :
88
- wppa_get_photo_url( $id, true, '', $args['width'], $args['height'] );
89
- }
90
- else {
91
- $href = $isthumb ? wppa_get_thumb_url( $id ) : wppa_get_photo_url( $id );
92
- }
93
- if ( $is_pdf ) {
94
- $href = wppa_get_hires_url( $id );
95
- }
96
-
97
- $autocol = wppa( 'auto_colwidth' ) || ( wppa( 'fullsize' ) > 0 && wppa( 'fullsize' ) <= 1.0 );
98
- $title = $link ? esc_attr( $link['title'] ) : esc_attr( stripslashes( wppa_get_photo_name( $id ) ) );
99
- $alt = wppa_get_imgalt( $id );
100
-
101
- // Find image style
102
- switch ( $type ) {
103
- case 'sphoto':
104
- $style = 'width:100%;margin:0;';
105
- if ( ! wppa_in_widget() ) {
106
- switch ( wppa_opt( 'fullimage_border_width' ) ) {
107
- case '':
108
- $style .= 'padding:0;' .
109
- 'border:none;';
110
- break;
111
- case '0':
112
- $style .= 'padding:0;' .
113
- 'border:1px solid ' . wppa_opt( 'bcolor_fullimg' ) . ';' .
114
- 'box-sizing:border-box;';
115
- break;
116
- default:
117
- $style .= 'padding:' . ( wppa_opt( 'fullimage_border_width' ) - '1' ) . 'px;' .
118
- 'border:1px solid ' . wppa_opt( 'bcolor_fullimg' ) . ';' .
119
- 'box-sizing:border-box;' .
120
- 'background-color:' . wppa_opt( 'bgcolor_fullimg' ) . ';';
121
-
122
- // If we do round corners...
123
- if ( wppa_opt( 'bradius' ) > '0' ) {
124
-
125
- // then also here
126
- $style .= 'border-radius:' . wppa_opt( 'fullimage_border_width' ) . 'px;';
127
- }
128
- }
129
- }
130
- break;
131
- case 'mphoto':
132
- case 'xphoto':
133
- $style = 'width:100%;margin:0;padding:0;border:none;';
134
- break;
135
- default:
136
- wppa_dbg_msg( 'Style for type ' . $type . ' is not implemented yet in wppa_get_picture_html()', 'red', 'force' );
137
- return false;
138
-
139
- }
140
- if ( $link['is_lightbox'] ) {
141
- $title = wppa_zoom_in( $id );
142
- }
143
-
144
- // Create the html. To prevent mis-alignment of the audio control bar or to escape from the <a> tag for the pan controlbar
145
- // we wrap it in a div with zero fontsize and lineheight.
146
- $result = '<div style="font-size:0;line-height:0;" >';
147
-
148
- if ( $is_pdf && $mocc ) {
149
- $result .= wppa_js( '<script>wppaAutoColumnWidth[' . $mocc . '] = true;wppaAutoColumnFrac[' . $mocc . ']=1;wppaTopMoc=' . $mocc . ';</script>' );
150
- }
151
-
152
- // The link
153
- if ( $link ) {
154
-
155
- // Link is lightbox
156
- if ( $link['is_lightbox'] ) {
157
- $lbtitle = wppa_get_lbtitle( $type, $id );
158
- $videobody = esc_attr( wppa_get_video_body( $id ) );
159
- $audiobody = esc_attr( wppa_get_audio_body( $id ) );
160
- $videox = wppa_get_videox( $id );
161
- $videoy = wppa_get_videoy( $id );
162
- if ( $type == 'photo' || $type == 'mphoto' || $type == 'xphoto' ) {
163
- $setname = '['.$type.']';
164
- }
165
- else {
166
- $setname = '';
167
- }
168
-
169
- $result .=
170
- '<a' .
171
- ' data-id="' . wppa_encrypt_photo( $id ) . '"' .
172
- ' href="' . $link['url'] . '"' .
173
- ( $lbtitle ? ' ' . wppa( 'lbtitle' ) . '="'.esc_attr($lbtitle).'"' : '' ) .
174
- ( $videobody ? ' data-videohtml="' . $videobody . '"' : '' ) .
175
- ( $audiobody ? ' data-audiohtml="' . $audiobody . '"' : '' ) .
176
- ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
177
- ( $videox ? ' data-videonatwidth="' . $videox . '"' : '' ) .
178
- ( $videoy ? ' data-videonatheight="' . $videoy . '"' : '' ) .
179
- ' ' . wppa( 'rel' ) . '="'.wppa_opt( 'lightbox_name' ).$setname.'"' .
180
- wppa_get_lb_panorama_full_html( $id ) .
181
- ( $link['target'] ? ' target="' . $link['target'] . '"' : '' ) .
182
- ' class="thumb-img"' .
183
- ' id="a-' . $id . '-' . wppa( 'mocc' ) . '"' .
184
- ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
185
- ' style="cursor:' . wppa_wait() . ';"' .
186
- ' onclick="return false;"' .
187
- ' >';
188
- }
189
-
190
- // Link is NOT lightbox
191
- else {
192
- $result .=
193
- '<a' .
194
- ( wppa_is_mobile() ?
195
- ' ontouchstart="wppaStartTime();" ontouchend="wppaTapLink(\'' . $id . '\',\'' . $link['url'] . '\');" ' :
196
- ' onclick="_bumpClickCount( \'' . $id . '\' );window.open(\'' . $link['url'] . '\', \'' . $link['target'] . '\' )"'
197
- ) .
198
- ' title="' . $link['title'] . '"' .
199
- ' class="thumb-img"' .
200
- ' id="a-' . $id . '-' . wppa( 'mocc' ) . '"' .
201
- ' style="cursor:pointer;"' .
202
- ' >';
203
- }
204
- }
205
-
206
- // The image
207
- // Panorama? Only if browser supports html5
208
- if ( wppa_is_panorama( $id ) && wppa_browser_can_html5() ) {
209
- $result .= wppa_get_panorama_html( array( 'id' => $id,
210
- 'width' => $args['width'],
211
- 'height' => $args['height'],
212
- 'haslink' => $link,
213
- ) );
214
- }
215
-
216
- // Video?
217
- elseif ( wppa_is_video( $id ) ) {
218
- $result .=
219
- wppa_get_video_html( array( 'id' => $id,
220
- 'controls' => ! $link,
221
- 'style' => $style,
222
- 'class' => $class,
223
- )
224
- );
225
-
226
- }
227
-
228
- // Pdf?
229
- elseif ( $is_pdf ) {
230
- $result .= '
231
- <iframe
232
- id="pdf-' . $id . '-' . wppa( 'mocc' ) . '"
233
- src="' . $href . '" ' .
234
- wppa_get_imgalt( $id ) .
235
- ( $class ? ' class="' . $class . '" ' : '' ) .
236
- ( $title ? ' title="' . $title . '" ' : '' ) . '
237
- style="' . $style . '"
238
- >
239
- </iframe>';
240
- }
241
-
242
- // No video, just a photo
243
- else {
244
- $result .=
245
- '<img' .
246
- ' id="ph-' . $id . '-' . wppa( 'mocc' ) . '"' .
247
- ' src="' . $href . '"' .
248
- ' ' . wppa_get_imgalt( $id ) .
249
- ( $class ? ' class="' . $class . '" ' : '' ) .
250
- ( $title ? ' title="' . $title . '" ' : '' ) .
251
- ' style="' . $style . '"' .
252
- ' />';
253
- }
254
-
255
- // Close the link
256
- if ( $link ) {
257
- $result .= '</a>';
258
- }
259
-
260
- // Add audio? sphoto
261
- if ( wppa_has_audio( $id ) ) {
262
-
263
- $result .= '<div style="position:relative;z-index:11;" >';
264
-
265
- // Find style for audio controls
266
- switch ( $type ) {
267
- case 'sphoto':
268
- $pad = ( wppa_opt( 'fullimage_border_width' ) === '' ) ? 0 : wppa_opt( 'fullimage_border_width' );
269
- $bot = ( wppa_opt( 'fullimage_border_width' ) === '' ) ? 0 : wppa_opt( 'fullimage_border_width' );
270
-
271
- $style = 'margin:0;' .
272
- 'padding:0 ' . $pad . 'px;' .
273
- 'bottom:' . $bot .'px;';
274
-
275
- $class = 'size-medium wppa-sphoto wppa-sphoto-' . wppa( 'mocc' );
276
- break;
277
- case 'mphoto':
278
- case 'xphoto':
279
- $style = 'margin:0;' .
280
- 'padding:0;' .
281
- 'bottom:0;';
282
- $class = 'size-medium wppa-' . $type . ' wppa-' . $type . '-' . wppa( 'mocc' );
283
- break;
284
- default:
285
- $style = 'margin:0;' .
286
- 'padding:0;';
287
-
288
- $class = '';
289
- }
290
-
291
- // Get the html for audio
292
- $result .= wppa_get_audio_html( array( 'id' => $id,
293
- 'cursor' => 'cursor:pointer;',
294
- 'style' => $style .
295
- 'position:absolute;' .
296
- 'box-sizing:border-box;' .
297
- 'width:100%;' .
298
- 'border:none;' .
299
- 'height:' . wppa_get_audio_control_height() . 'px;' .
300
- 'border-radius:0;',
301
- 'class' => $class,
302
- )
303
- );
304
- $result .= '</div>';
305
- }
306
-
307
- $result .= '</div>';
308
-
309
- // Update statistics
310
- if ( ! wppa_in_widget() ) {
311
- wppa_bump_viewcount( 'photo', $id );
312
- }
313
-
314
- // Done !
315
- return $result;
316
}
317
318
// Get full html for a lightbox pan image, e.g. ' data-panorama="'..."' for use in lightbox anchor link
319
function wppa_get_lb_panorama_full_html( $id ) {
320
321
- $result = wppa_get_lb_panorama_html( $id );
322
- if ( $result ) {
323
- return ' data-panorama="' . esc_attr( $result ) . '"';
324
- }
325
- else {
326
- return '';
327
- }
328
}
329
330
// Get the html for a lightbox pan image
331
function wppa_get_lb_panorama_html( $id ) {
332
333
- return wppa_get_panorama_html( array( 'id' => $id, 'lightbox' => true, ) );
334
}
335
336
// Get the html for a pan image
337
function wppa_get_panorama_html( $args ) {
338
339
- // If no id given, quit
340
- if ( ! isset( $args['id'] ) ) return;
341
342
- $args['controls'] = ( wppa_opt( 'panorama_control' ) == 'all' ) || ( wppa_opt( 'panorama_control' ) == 'mobile' && wppa_is_mobile() );
343
- $args['manual'] = wppa_opt( 'panorama_manual' ) == 'all' ? true : false;
344
- $args['autorun'] = wppa_opt( 'panorama_autorun' ) == 'none' ? '' : wppa_opt( 'panorama_autorun' );
345
- $args['autorunspeed'] = wppa_opt( 'panorama_autorun_speed' );
346
- $args['zoomsensitivity'] = wppa_opt( 'panorama_wheel_sensitivity' );
347
348
- switch( wppa_is_panorama( $args['id'] ) ) {
349
350
- case '1':
351
- $result = wppa_get_spheric_pan_html( $args );
352
353
- // Save we have a spheric panorama on board for loading THREE.js
354
- wppa( 'has_panorama', true );
355
- break;
356
- case '2':
357
- $result = wppa_get_flat_pan_html( $args );
358
- break;
359
- default:
360
- $result = '';
361
- }
362
363
- return $result;
364
}
365
366
// Spheric 360deg pan
367
function wppa_get_spheric_pan_html( $args ) {
368
369
- // Init
370
- $defaults = array( 'id' => '0',
371
- 'mocc' => '0',
372
- 'width' => false,
373
- 'height' => false,
374
- 'haslink' => false,
375
- 'lightbox' => 0,
376
- 'controls' => true,
377
- 'autorun' => '',
378
- 'manual' => true,
379
- 'autorunspeed' => '3',
380
- 'zoomsensitivity' => '3',
381
-
382
- );
383
-
384
- $args = wp_parse_args( $args, $defaults );
385
-
386
- $id = strval( intval ( $args['id'] ) );
387
- $mocc = $args['mocc'] ? $args['mocc'] : wppa( 'mocc' );
388
- $width = $args['width'] ? $args['width'] : wppa_get_container_width();
389
- $height = $args['height'] ? $args['height'] : round( $width * wppa_get_photoy( $id ) / wppa_get_photox( $id ) );
390
- $haslink = $args['haslink'];
391
- $icsiz = wppa_opt( 'nav_icon_size_panorama' );
392
- $iconsize = $icsiz . 'px;';
393
- $lightbox = $args['lightbox'];
394
- $controls = $args['controls'];
395
- $autorun = $args['autorun'];
396
- $manual = $args['manual'];
397
- $autorunspeed = $args['autorunspeed'];
398
- $zoomsensitivity = $args['zoomsensitivity'];
399
-
400
- $url = esc_url( wppa_is_mobile() ? wppa_get_photo_url( $id ) : wppa_get_hires_url( $id ) );
401
-
402
- $result =
403
- ( $lightbox ? $id . '.' : '' ) .
404
- ( $haslink ? '</a>' : '' ) .
405
- ( $lightbox ? '<div id="wppa-ovl-pan-container" >' : '' ) .
406
- '<div
407
- id="wppa-pan-div-' . $mocc . '"
408
- class="wppa-pan-div wppa-pan-div-' . $mocc . '"
409
- style="' . ( $controls ? 'margin-bottom:4px;' : '' ) . ( $manual ? 'cursor:grab;': '' ) . 'line-height:0;"
410
- >
411
- </div>' .
412
- ( $controls ?
413
- '<div
414
- id="wppa-pctl-div-' . $mocc . '"
415
- class="wppa-pctl-div wppa-pctl-div-' . $mocc . '"
416
- style="text-align:center;"
417
- >' .
418
- ( $lightbox ?
419
- '<span
420
- id="wppa-pctl-prev-' . $mocc . '"
421
- class="wppa-pan-prevnext"
422
- style="margin:0 2px 0 0;float:left;"
423
- >' .
424
- wppa_get_svghtml( 'Prev-Button', $iconsize, true ) .
425
- '</span>'
426
- :
427
- ''
428
- ) .
429
- '<span
430
- id="wppa-pctl-left-' . $mocc . '"
431
- style="margin:0 2px;"
432
- >' .
433
- wppa_get_svghtml( 'Left-4', $iconsize, true ) .
434
- '</span>
435
- <span
436
- id="wppa-pctl-right-' . $mocc . '"
437
- style="margin:0 2px;"
438
- >' .
439
- wppa_get_svghtml( 'Right-4', $iconsize, true ) .
440
- '</span>
441
- <span
442
- id="wppa-pctl-up-' . $mocc . '"
443
- style="margin:0 2px;"
444
- >' .
445
- wppa_get_svghtml( 'Up-4', $iconsize, true ) .
446
- '</span>
447
- <span
448
- id="wppa-pctl-down-' . $mocc . '"
449
- style="margin:0 2px;"
450
- >' .
451
- wppa_get_svghtml( 'Down-4', $iconsize, true ) .
452
- '</span>
453
- <span
454
- id="wppa-pctl-zoomin-' . $mocc . '"
455
- style="margin:0 2px;"
456
- >' .
457
- wppa_get_svghtml( 'ZoomIn', $iconsize, true ) .
458
- '</span>
459
- <span
460
- id="wppa-pctl-zoomout-' . $mocc . '"
461
- style="margin:0 2px;"
462
- >' .
463
- wppa_get_svghtml( 'ZoomOut', $iconsize, true ) .
464
- '</span>' .
465
- ( $lightbox ?
466
- '<span
467
- id="wppa-pctl-next-' . $mocc . '"
468
- class="wppa-pan-prevnext"
469
- style="margin:0 0 0 2px;float:right;"
470
- >' .
471
- wppa_get_svghtml( 'Next-Button', $iconsize, true ) .
472
- '</span>'
473
- :
474
- ''
475
- ) .
476
- '</div>'
477
- :
478
- '' ) .
479
-
480
- ( $lightbox ? '</div>' : '' ) .
481
-
482
- '<script>' .
483
-
484
- // Create image object and add the image url to it
485
- 'var image' . $mocc . ' = new Image();
486
- image' . $mocc . '.src = "' . $url . '";' .
487
-
488
- // When document complete, run the main proc
489
- 'jQuery(document).ready(function(){wppaDoSphericPanorama' . $mocc . '();});' .
490
-
491
- // The main proccedure
492
- 'function wppaDoSphericPanorama' . $mocc . '(){' .
493
-
494
- // Wait until the image file has been completely loaded
495
- 'if (!image' . $mocc . '.complete){setTimeout( wppaDoSphericPanorama' . $mocc . ', 100 );return;};' .
496
-
497
- // Var declarations
498
- 'var
499
- $ = jQuery,
500
- uniqueId,
501
- manualControl = false,
502
- longitude = 180,
503
- latitude = 0,
504
- savedX,
505
- savedY,
506
- savedLongitude,
507
- savedLatitude,' .
508
- ( $autorun == 'right' ? 'deltaX = 0.05 * ' . $autorunspeed . ' / 3,' : '' ) .
509
- ( $autorun == 'left' ? 'deltaX = -0.05 * ' . $autorunspeed . ' / 3,' : '' ) .
510
- ( $autorun == '' ? 'deltaX = 0,' : '' ) .
511
- 'deltaY = 0,
512
- deltaFov = 0,
513
- fov = 75,
514
- abort = false,
515
- aspect = ' . $width / $height . ',
516
- div = $( "#wppa-pan-div-' . $mocc . '" ),
517
- left = $("#wppa-pctl-left-' . $mocc . '" ),
518
- right = $("#wppa-pctl-right-' . $mocc . '" ),
519
- up = $("#wppa-pctl-up-' . $mocc . '" ),
520
- down = $("#wppa-pctl-down-' . $mocc . '" ),
521
- zoomin = $("#wppa-pctl-zoomin-' . $mocc . '" ),
522
- zoomout = $("#wppa-pctl-zoomout-' . $mocc . '" ),
523
- prev = $("#wppa-pctl-prev-' . $mocc . '" ),
524
- next = $("#wppa-pctl-next-' . $mocc . '" );' .
525
-
526
- // Setting the global id, indicating the most recent invocation
527
- ( $lightbox ? '
528
- wppaGlobalOvlPanoramaId++;
529
- uniqueId = wppaGlobalOvlPanoramaId;' :
530
- '' ) .
531
-
532
- // Lghtbox uses the global vars used for the webGL context
533
- ( $lightbox ?
534
- // setting up the renderer
535
- 'if ( ! wppaRenderer ) {
536
- wppaRenderer = new THREE.WebGLRenderer();
537
- }
538
- wppaRenderer.setSize(' . $width . ', ' . $height . ');
539
- $(div).append(wppaRenderer.domElement);' .
540
-
541
- // Creating a new scene if not yet available
542
- 'if ( ! wppaScene ) {
543
- wppaScene = new THREE.Scene();
544
- }' .
545
-
546
- // Adding a camera
547
- 'if ( ! wppaCamera ) {
548
- wppaCamera = new THREE.PerspectiveCamera(fov, aspect, 1, 1000);
549
- wppaCamera.target = new THREE.Vector3(0, 0, 0);
550
- }' .
551
-
552
- // Creation of a big sphere geometry
553
- 'if ( ! wppaSphere ) {
554
- wppaSphere = new THREE.SphereGeometry(100, 100, 40);
555
- wppaSphere.applyMatrix(new THREE.Matrix4().makeScale(-1, 1, 1));
556
- }' .
557
-
558
- // Creation of the sphere material
559
- 'if ( ! wppaSphereMaterial ) {
560
- wppaSphereMaterial = new THREE.MeshBasicMaterial();
561
- }
562
- wppaSphereMaterial.map = THREE.ImageUtils.loadTexture("' . $url . '");' .
563
-
564
- // geometry + material = mesh (actual object)
565
- 'if ( ! wppaSphereMesh ) {
566
- wppaSphereMesh = new THREE.Mesh(wppaSphere, wppaSphereMaterial);
567
- wppaScene.add(wppaSphereMesh);
568
- }
569
- ' :
570
-
571
- // setting up the wpparenderer
572
- 'var wppaRenderer = new THREE.WebGLRenderer();
573
- wppaRenderer.setSize(' . $width . ', ' . $height . ');' .
574
-
575
- // Place the element
576
- '$(div).append(wppaRenderer.domElement);' .
577
-
578
- // Creating a new scene
579
- 'var wppaScene = new THREE.Scene();' .
580
-
581
- // Adding a camera
582
- 'var wppaCamera = new THREE.PerspectiveCamera(fov, aspect, 1, 1000);
583
- wppaCamera.target = new THREE.Vector3(0, 0, 0);' .
584
-
585
- // Creation of a big sphere geometry
586
- 'var wppaSphere = new THREE.SphereGeometry(100, 100, 40);
587
- wppaSphere.applyMatrix(new THREE.Matrix4().makeScale(-1, 1, 1));' .
588
-
589
- // Creation of the sphere material
590
- 'var wppaSphereMaterial = new THREE.MeshBasicMaterial();
591
- wppaSphereMaterial.map = THREE.ImageUtils.loadTexture("' . $url . '");' .
592
-
593
- // geometry + material = mesh (actual object)
594
- 'var wppaSphereMesh = new THREE.Mesh(wppaSphere, wppaSphereMaterial);
595
- wppaScene.add(wppaSphereMesh);'
596
- ) .
597
-
598
- // listeners
599
- ( wppa_is_mobile() ?
600
- '$(right).on("touchstart", onRightMouseDown);
601
- $(right).on("touchend", onButtonUp);
602
- $(left).on("touchstart", onLeftMouseDown);
603
- $(left).on("touchend", onButtonUp);
604
- $(up).on("touchstart", onUpMouseDown);
605
- $(up).on("touchend", onButtonUp);
606
- $(down).on("touchstart", onDownMouseDown);
607
- $(down).on("touchend", onButtonUp);
608
- $(zoomin).on("touchstart", onZoomInMouseDown);
609
- $(zoomin).on("touchend", onButtonUp);
610
- $(zoomout).on("touchstart", onZoomOutMouseDown);
611
- $(zoomout).on("touchend", onButtonUp);'
612
- :
613
- ( $manual ?
614
- '$(div).on("mousedown", onDivMouseDown);
615
- $(div).on("mousemove", onDivMouseMove);
616
- $(div).on("mouseup", onDivMouseUp);
617
- document.getElementById("wppa-pan-div-' . $mocc . '").addEventListener("wheel", onDivWheel);' : '' ) .
618
- '$(right).on("mousedown", onRightMouseDown);
619
- $(right).on("mouseup", onButtonUp);
620
- $(left).on("mousedown", onLeftMouseDown);
621
- $(left).on("mouseup", onButtonUp);
622
- $(up).on("mousedown", onUpMouseDown);
623
- $(up).on("mouseup", onButtonUp);
624
- $(down).on("mousedown", onDownMouseDown);
625
- $(down).on("mouseup", onButtonUp);
626
- $(zoomin).on("mousedown", onZoomInMouseDown);
627
- $(zoomin).on("mouseup", onButtonUp);
628
- $(zoomout).on("mousedown", onZoomOutMouseDown);
629
- $(zoomout).on("mouseup", onButtonUp);
630
- '
631
- ) .
632
-
633
- // Common event handlers
634
- ( $lightbox ? '
635
- if (prev) {
636
- prev.on("click", panPrev);
637
- next.on("click", panNext);
638
- }' : '' ) .
639
-
640
- // Install Resize hanler
641
- '$(window).on("DOMContentLoaded load resize orientationchange",onResize);' .
642
-
643
- // Resize
644
- 'onResize();' .
645
-
646
- // Remove spinner
647
- '$("#wppa-ovl-spin").hide();' .
648
-
649
- // Doit!
650
- 'render();' .
651
-
652
- // The rendering function
653
- 'function render(){' .
654
-
655
- // See if a lightbox instance has to die
656
- ( $lightbox ? 'if ( ! wppaOvlOpen || wppaOvlActivePanorama != ' . $id . ' || wppaGlobalOvlPanoramaId > uniqueId ) abort=true;' : '' ) .
657
-
658
- // If the abort flag is risen, die gracefully
659
- 'if(abort){
660
- return;
661
- }' .
662
-
663
- 'requestAnimationFrame(render);
664
-
665
- if ( ! manualControl ) {
666
- longitude += deltaX;
667
- latitude += deltaY;
668
- }' .
669
-
670
- // limiting latitude from -85 to 85 (cannot point to the sky or under your feet)
671
- 'latitude = Math.max(-85, Math.min(85, latitude));' .
672
-
673
- // moving the wppaCamera according to current latitude (vertical movement) and longitude (horizontal movement)
674
- 'wppaCamera.target.x = 500 * Math.sin(THREE.Math.degToRad(90 - latitude)) * Math.cos(THREE.Math.degToRad(longitude));
675
- wppaCamera.target.y = 500 * Math.cos(THREE.Math.degToRad(90 - latitude));
676
- wppaCamera.target.z = 500 * Math.sin(THREE.Math.degToRad(90 - latitude)) * Math.sin(THREE.Math.degToRad(longitude));
677
- wppaCamera.lookAt(wppaCamera.target);' .
678
-
679
- // calling again render function
680
- 'wppaRenderer.render(wppaScene, wppaCamera);
681
- }' .
682
-
683
- // Mouse wheel
684
- 'function onDivWheel(e) {
685
- e.preventDefault();
686
- deltaFov=-e.deltaY * ' . $zoomsensitivity . ' / 6;
687
- doZoom(true);
688
- e.stopPropagation();
689
- }' .
690
-
691
- // Zoom in/out
692
- 'function doZoom(once){
693
- fov += deltaFov;
694
- fov = Math.max(20, Math.min(120, fov));
695
- wppaCamera = new THREE.PerspectiveCamera(fov, aspect, 1, 1000);
696
- wppaCamera.target = new THREE.Vector3(0, 0, 0);
697
- if ( ! once && deltaFov != 0 ) {
698
- setTimeout(function(){doZoom()}, 25);
699
- }
700
- if ( once ) {
701
- deltaFov = 0;
702
- }
703
- }' .
704
-
705
- // Previous
706
- 'function panPrev(e) {
707
- var stop;
708
- if ( ! stop ) {
709
- stop = true;
710
- $(this).css({opacity:0.5});
711
- $("#wppa-overlay-ic").css({display:"none"});
712
- $("#wppa-ovl-spin").show();
713
- wppaOvlShowPrev();
714
- }
715
- }' .
716
-
717
- // Next
718
- 'function panNext(e) {
719
- var stop;
720
- if ( ! stop ) {
721
- stop = true;
722
- $(this).css({opacity:0.5});
723
- $("#wppa-overlay-ic").css({display:"none"});
724
- $("#wppa-ovl-spin").show();
725
- wppaOvlShowNext();
726
- }
727
- }' .
728
-
729
- // Manual movement on the image div
730
- 'function onDivMouseDown(e){
731
- e.preventDefault();
732
- manualControl = true;
733
- savedX = e.clientX;
734
- savedY = e.clientY;
735
- savedLongitude = longitude;
736
- savedLatitude = latitude;
737
- }' .
738
- 'function onDivMouseMove(e){
739
- if(manualControl){
740
- longitude = (savedX - e.clientX) * 0.1 + savedLongitude;
741
- latitude = (e.clientY - savedY) * 0.1 + savedLatitude;
742
- }
743
- }' .
744
- 'function onDivMouseUp(e){
745
- manualControl = false;
746
- deltaX=0;
747
- }' .
748
-
749
- // Horizontal movement by buttons
750
- 'function onRightMouseDown(e) {
751
- deltaX=0.2;
752
- }' .
753
- 'function onLeftMouseDown(e) {
754
- deltaX=-0.2;
755
- }' .
756
-
757
- // Vertical movement by buttons
758
- 'function onUpMouseDown(e) {
759
- deltaY=0.2;
760
- }' .
761
- 'function onDownMouseDown(e) {
762
- deltaY=-0.2;
763
- }' .
764
-
765
- // Zooming
766
- 'function onZoomInMouseDown(e) {
767
- deltaFov=-0.4;
768
- doZoom();
769
- }' .
770
- 'function onZoomOutMouseDown(e) {
771
- deltaFov=0.4;
772
- doZoom();
773
- }' .
774
-
775
- // Release a button resets all deltas
776
- 'function onButtonUp(e) {
777
- deltaX=0;
778
- deltaY=0;
779
- deltaFov=0;
780
- }' .
781
-
782
- // When a (responsive) resize is required, we resize the wppaScene
783
- 'function onResize(e){' .
784
-
785
- ( $lightbox ?
786
-
787
- // Show image container
788
- '$("#wppa-overlay-ic").css("display", "");
789
- $("#wppa-overlay-ic").css("width", "");' .
790
-
791
- // There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
792
- 'var widthIsLim,
793
- modeIsNormal = wppaOvlMode == "normal";' .
794
-
795
- // Find container dimensions dependant of mode
796
- 'var contWidth, contHeight;
797
-
798
- if ( modeIsNormal ) {
799
- contWidth = window.innerWidth ? window.innerWidth : screen.width;
800
- contHeight = window.innerHeight ? window.innerHeight : screen.height;
801
- }
802
- else {
803
- contWidth = screen.width;
804
- contHeight = screen.height;
805
- }'.
806
// alert("contWidth="+contWidth);' .
807
808
- // Initialize new display sizes
809
- 'var newWidth,
810
- newHeight,
811
- topMarg,
812
- leftMarg,
813
- extraX = 8,
814
- extraY = 8 + ' . ( $controls ? $icsiz + 10 : 0 ) . ' + 30;' .
815
-
816
- // Add borderwidth in case of mode == normal
817
- 'if ( modeIsNormal ) {
818
- extraX += 2 * ' . wppa_opt( 'ovl_border_width' ) . ';
819
- extraY += 2 * ' . wppa_opt( 'ovl_border_width' ) . ';
820
- }
821
- ' .
822
-
823
- // Find out if the width is the limitng dimension
824
- 'widthIsLim = ( contHeight > ( ( ( contWidth - extraX ) / 2 ) + extraY ) );' .
825
-
826
- // Compute new sizes and margins
827
- 'if ( widthIsLim ) {
828
- newWidth = contWidth - extraX;
829
- newHeight = newWidth / 2;
830
- topMarg = ( contHeight - newHeight - extraY ) / 2 + 20;' .
831
- '}
832
- else {
833
- newHeight = contHeight - extraY;
834
- newWidth = newHeight * 2;
835
- topMarg = 20;' .
836
-
837
- '}
838
- newWidth = parseInt(newWidth);
839
- newHeight = parseInt(newHeight);
840
- ' .
841
-
842
- // Set css common for all 4 situations
843
- '$("#wppa-ovl-pan-container").css({marginTop:topMarg});
844
- $("#wppa-overlay-ic").css({marginTop:0});' .
845
-
846
- // Now set css for all 4 situations: Mode is normal
847
- 'if ( modeIsNormal ) {' .
848
-
849
- // Common for mode normal
850
- '$("#wppa-ovl-pan-container").css({
851
- backgroundColor:"' . wppa_opt( 'ovl_theme' ) . '",
852
- padding:"' . wppa_opt( 'ovl_border_width' ) . 'px",
853
- borderRadius:"' . wppa_opt( 'ovl_border_radius' ) . 'px",
854
- width:newWidth,
855
- marginLeft:0
856
- });
857
- $( "#wppa-pctl-div-' . $mocc . '" ).css({marginLeft:0});' .
858
-
859
- // Limit specific
860
- 'if ( widthIsLim ) {
861
- $("#wppa-overlay-ic").css({marginLeft:4});
862
- }
863
- else {
864
- $("#wppa-overlay-ic").css({marginLeft:(contWidth-newWidth)/2});
865
- }
866
- }' .
867
-
868
- // Mode is fullscreen
869
- 'else {' .
870
-
871
- // Common for mode fullscreen
872
- '$("#wppa-overlay-ic").css({marginLeft:0});
873
- $("#wppa-ovl-pan-container").css({
874
- backgroundColor:"transparent",
875
- padding:0,
876
- borderRadius:0,
877
- width:newWidth,
878
- marginLeft:(contWidth-newWidth)/2
879
- });
880
-
881
- if ( widthIsLim ) {
882
- $("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});
883
- }
884
- else {
885
- $("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});
886
- }
887
- }
888
-
889
- wppaRenderer.setSize(newWidth, newHeight);
890
- doZoom(true);
891
- ' :
892
- '
893
- var containerwidth = $(div).parent().width();
894
- var newWidth = containerwidth;
895
- var newHeight = newWidth * ' . ( $height / $width ) . ';
896
- wppaRenderer.setSize(newWidth, newHeight);
897
- doZoom(true);'
898
- ) . '
899
- }' .
900
- '};
901
-
902
- </script>
903
- ' . ( $haslink ? '<a>' : '' ) . '';
904
-
905
- return wppa_pan_min( $result );
906
}
907
908
// Non 360 flat pan
909
function wppa_get_flat_pan_html( $args ) {
910
911
- // Init
912
- $defaults = array( 'id' => '0',
913
- 'mocc' => '0',
914
- 'width' => false,
915
- 'height' => false,
916
- 'haslink' => false,
917
- 'lightbox' => 0,
918
- 'controls' => true,
919
- 'autorun' => '',
920
- 'manual' => true,
921
- 'autorunspeed' => '3',
922
- 'zoomsensitivity' => '3',
923
- );
924
-
925
- $args = wp_parse_args( $args, $defaults );
926
-
927
- $id = strval( intval ( $args['id'] ) );
928
- $mocc = $args['mocc'] ? $args['mocc'] : wppa( 'mocc' );
929
- $width = $args['width'] ? $args['width'] : wppa_get_container_width();
930
- $height = $args['height'] ? $args['height'] : round( $width * wppa_get_photoy( $id ) / wppa_get_photox( $id ) );
931
- $haslink = $args['haslink'];
932
- $icsiz = wppa_opt( 'nav_icon_size_panorama' );
933
- $iconsize = $icsiz . 'px;';
934
- $lightbox = $args['lightbox'];
935
- $controls = $args['controls'];
936
- $autorun = $args['autorun'];
937
- $manual = $args['manual'];
938
- $autorunspeed = $args['autorunspeed'];
939
- $zoomsensitivity = $args['zoomsensitivity'];
940
-
941
- switch ( $autorun ) {
942
- case 'right':
943
- $deltaX = $autorunspeed / 3;
944
- break;
945
- case 'left':
946
- $deltaX = - $autorunspeed / 3;
947
- break;
948
- default:
949
- $deltaX = '0';
950
- }
951
-
952
- $url = esc_url( wppa_is_mobile() ? wppa_get_photo_url( $id ) : wppa_get_hires_url( $id ) );
953
-
954
- $result =
955
- ( $lightbox ? $id . '.' : '' ) .
956
- ( $haslink ? '</a>' : '' ) .
957
-
958
- // The overall container
959
- ( $lightbox ? '<div id="wppa-ovl-pan-container" >' : '' ) .
960
-
961
- // The canvas container
962
- '<div
963
- id="wppa-pan-div-' . $mocc . '"
964
- class="wppa-pan-div wppa-pan-div-' . $mocc . '"
965
- style="' . ( $controls ? 'margin-bottom:4px;' : '' ) . 'line-height:0;"
966
- >' .
967
-
968
- // The actual drawing area
969
- '<canvas
970
- id="wppa-pan-canvas-' . $mocc . '"
971
- style="background-color:black;' . ( $manual ? 'cursor:grab;' : '' ) . '"
972
- width="' . $width . '"
973
- height="' . ( $width / 2 ) . '"
974
- ></canvas>' .
975
-
976
- // The preview image
977
- '<canvas
978
- id="wppa-pan-prev-canvas-' . $mocc . '"
979
- style="margin-top:4px;background-color:black;"
980
- width="' . $width . '"
981
- height=' . $height . '"
982
- ></canvas>
983
-
984
- </div>' .
985
-
986
- // The controlbar
987
- ( $controls ?
988
- '<div
989
- id="wppa-pctl-div-' . $mocc . '"
990
- class="wppa-pctl-div wppa-pctl-div-' . $mocc . '"
991
- style="text-align:center;"
992
- >' .
993
- ( $lightbox ?
994
- '<span
995
- id="wppa-pctl-prev-' . $mocc . '"
996
- class="wppa-pan-prevnext"
997
- style="margin:0 2px 0 0;float:left;"
998
- >' .
999
- wppa_get_svghtml( 'Prev-Button', $iconsize, true ) .
1000
- '</span>'
1001
- :
1002
- ''
1003
- ) .
1004
- '<span
1005
- id="wppa-pctl-left-' . $mocc . '"
1006
- style="margin:0 2px;"
1007
- >' .
1008
- wppa_get_svghtml( 'Left-4', $iconsize, true ) .
1009
- '</span>
1010
- <span
1011
- id="wppa-pctl-right-' . $mocc . '"
1012
- style="margin:0 2px;"
1013
- >' .
1014
- wppa_get_svghtml( 'Right-4', $iconsize, true ) .
1015
- '</span>
1016
- <span
1017
- id="wppa-pctl-up-' . $mocc . '"
1018
- style="margin:0 2px;"
1019
- >' .
1020
- wppa_get_svghtml( 'Up-4', $iconsize, true ) .
1021
- '</span>
1022
- <span
1023
- id="wppa-pctl-down-' . $mocc . '"
1024
- style="margin:0 2px;"
1025
- >' .
1026
- wppa_get_svghtml( 'Down-4', $iconsize, true ) .
1027
- '</span>
1028
- <span
1029
- id="wppa-pctl-zoomin-' . $mocc . '"
1030
- style="margin:0 2px;"
1031
- >' .
1032
- wppa_get_svghtml( 'ZoomIn', $iconsize, true ) .
1033
- '</span>
1034
- <span
1035
- id="wppa-pctl-zoomout-' . $mocc . '"
1036
- style="margin:0 2px;"
1037
- >' .
1038
- wppa_get_svghtml( 'ZoomOut', $iconsize, true ) .
1039
- '</span>' .
1040
- ( $lightbox ?
1041
- '<span
1042
- id="wppa-pctl-next-' . $mocc . '"
1043
- class="wppa-pan-prevnext"
1044
- style="margin:0 0 0 2px;float:right;"
1045
- >' .
1046
- wppa_get_svghtml( 'Next-Button', $iconsize, true ) .
1047
- '</span>'
1048
- :
1049
- ''
1050
- ) .
1051
- '</div>'
1052
- :
1053
- '' ) .
1054
-
1055
- ( $lightbox ? '</div>' : '' ) .
1056
-
1057
- '<script>' .
1058
-
1059
- // Create image object and add the image url to it
1060
- 'var image' . $mocc . ' = new Image();
1061
- image' . $mocc . '.src = "' . $url . '";' .
1062
-
1063
- // When document complete, run the main proc
1064
- 'jQuery(document).ready(function(){wppaDoFlatPanorama' . $mocc . '();});' .
1065
-
1066
- // The main proccedure
1067
- 'function wppaDoFlatPanorama' . $mocc . '(){' .
1068
-
1069
- // Wait until the image file has been completely loaded
1070
- 'if (!image' . $mocc . '.complete){setTimeout( wppaDoFlatPanorama' . $mocc . ', 100 );return;}' .
1071
-
1072
- // Var declarations
1073
- 'var
1074
- $ = jQuery,
1075
- manualControl = false,
1076
- zoomsensitivity = ' . $zoomsensitivity . ',
1077
- deltaX = ' . $deltaX . ',
1078
- deltaY = 0,
1079
- deltaFactor = 1.0,
1080
- autorun = ' . ( $autorun ? 'true' : 'false' ) . ',
1081
- run = deltaX ? 5 : 4,
1082
- busy = false,
1083
- abort = false,
1084
- div = $("#wppa-pan-div-' . $mocc . '"),
1085
- canvas = document.getElementById("wppa-pan-canvas-' . $mocc . '"),
1086
- prevCanvas = document.getElementById("wppa-pan-prev-canvas-' . $mocc . '"),
1087
- left = $("#wppa-pctl-left-' . $mocc . '"),
1088
- right = $("#wppa-pctl-right-' . $mocc . '"),
1089
- up = $("#wppa-pctl-up-' . $mocc . '"),
1090
- down = $("#wppa-pctl-down-' . $mocc . '"),
1091
- zoomin = $("#wppa-pctl-zoomin-' . $mocc . '"),
1092
- zoomout = $("#wppa-pctl-zoomout-' . $mocc . '"),
1093
- prev = $("#wppa-pctl-prev-' . $mocc . '"),
1094
- next = $("#wppa-pctl-next-' . $mocc . '"),
1095
- canvasWidth = $(div).parent().width(),
1096
- canvasHeight = canvasWidth / 2,
1097
- savedCanvasX = 0,
1098
- savedCanvasY = 0,
1099
- fromHeight = image' . $mocc . '.height / 2,
1100
- fromWidth = fromHeight * 2,
1101
- fromX = ( image' . $mocc . '.width - fromWidth ) / 2,
1102
- fromY = ( image' . $mocc . '.height - fromHeight ) / 2,
1103
- centerX = fromX + fromWidth / 2,
1104
- centerY = fromY + fromHeight / 2;' .
1105
-
1106
- // Install listeners
1107
- ( wppa_is_mobile() ?
1108
- 'right.on("touchstart", onRightMouseDown);
1109
- right.on("touchend", onButtonUp);
1110
- left.on("touchstart", onLeftMouseDown);
1111
- left.on("touchend", onButtonUp);
1112
- up.on("touchstart", onUpMouseDown);
1113
- up.on("touchend", onButtonUp);
1114
- down.on("touchstart", onDownMouseDown);
1115
- down.on("touchend", onButtonUp);
1116
- zoomin.on("touchstart", onZoomInMouseDown);
1117
- zoomin.on("touchend", onButtonUp);
1118
- zoomout.on("touchstart", onZoomOutMouseDown);
1119
- zoomout.on("touchend", onButtonUp);'
1120
- :
1121
- ( $manual ?
1122
- 'canvas.addEventListener("mousedown", onCanvasMouseDown);
1123
- canvas.addEventListener("mousemove", onCanvasMouseMove);
1124
- canvas.addEventListener("mouseup", onCanvasMouseUp);
1125
- canvas.addEventListener("mouseout", onCanvasMouseUp);
1126
- document.getElementById("wppa-pan-canvas-' . $mocc . '").addEventListener("wheel", onDivWheel);
1127
- prevCanvas.addEventListener("mousedown", onCanvasMouseDown);
1128
- prevCanvas.addEventListener("mousemove", onPrevCanvasMouseMove);
1129
- prevCanvas.addEventListener("mouseup", onCanvasMouseUp);
1130
- prevCanvas.addEventListener("mouseout", onCanvasMouseUp);' : '' ) .
1131
- 'right.on("mousedown", onRightMouseDown);
1132
- right.on("mouseup", onButtonUp);
1133
- left.on("mousedown", onLeftMouseDown);
1134
- left.on("mouseup", onButtonUp);
1135
- up.on("mousedown", onUpMouseDown);
1136
- up.on("mouseup", onButtonUp);
1137
- down.on("mousedown", onDownMouseDown);
1138
- down.on("mouseup", onButtonUp);
1139
- zoomin.on("mousedown", onZoomInMouseDown);
1140
- zoomin.on("mouseup", onButtonUp);
1141
- zoomout.on("mousedown", onZoomOutMouseDown);
1142
- zoomout.on("mouseup", onButtonUp);'
1143
- ) .
1144
-
1145
- // Common event handlers
1146
- ( $lightbox ? '
1147
- $("#wppa-fulls-btn").on("click", function(){abort=true;});
1148
- if (prev) {
1149
- prev.on("click", panPrev);
1150
- next.on("click", panNext);
1151
- }' : '' ) .
1152
-
1153
- // Install Resize handler
1154
- '$(window).on("DOMContentLoaded load resize orientationchange",onResize' . $mocc . ');' .
1155
-
1156
- // Remove spinner
1157
- '$("#wppa-ovl-spin").hide();' .
1158
-
1159
- // Do the rendering
1160
- 'render();' .
1161
-
1162
- // Resize
1163
- 'onResize' . $mocc . '();' .
1164
-
1165
- // The render function
1166
- 'function render(){' .
1167
-
1168
- ( $lightbox ? 'if (!wppaOvlOpen) abort=true;' :'' ) .
1169
- 'if (abort) {
1170
- ctx = null;
1171
- prevctx = null;
1172
- return;
1173
- }
1174
- if (run==0) return;
1175
- if (busy) return;
1176
- busy = true;' .
1177
-
1178
- ( $lightbox ? 'if ( wppaOvlActivePanorama != ' . $id . ' ) return;' : '' ) .
1179
-
1180
- // manualControl is true when a drag on the canvas is being performed
1181
- 'if(!manualControl){' .
1182
-
1183
- // Panning
1184
- 'fromX += deltaX;
1185
- fromY += deltaY;' .
1186
-
1187
- // Zooming
1188
- 'var newHeight = fromHeight / deltaFactor;
1189
- var newWidth = fromWidth / deltaFactor;' .
1190
-
1191
- // Keep zooming in range
1192
- 'if ( deltaFactor != 1 && newHeight <= image' . $mocc . '.height && newHeight > 50 ) {
1193
- fromX -= ( newWidth - fromWidth ) / 2;
1194
- fromY -= ( newHeight - fromHeight ) / 2;
1195
- fromWidth = newWidth;
1196
- fromHeight = newHeight;
1197
- }
1198
- }' .
1199
-
1200
- // Keep viewport within image boundaries
1201
- 'fromX = Math.max(0, Math.min(image' . $mocc . '.width-fromWidth, fromX));' .
1202
- 'fromY = Math.max(0, Math.min(image' . $mocc . '.height-fromHeight, fromY));' .
1203
-
1204
- // Check for turningpoint in case autrun
1205
- 'if ( autorun ) {
1206
- if ( fromX == 0 || fromX == ( image' . $mocc . '.width-fromWidth ) ) {
1207
- deltaX *= -1;
1208
- }
1209
- }' .
1210
-
1211
- // Draw the image
1212
- 'var ctx = canvas.getContext("2d");' .
1213
- 'ctx.drawImage(image' . $mocc . ',fromX,fromY,fromWidth,fromHeight,0,0,canvas.width,canvas.height);' .
1214
-
1215
- // Draw the preview image
1216
- 'var prevctx = prevCanvas.getContext("2d");' .
1217
- 'prevctx.clearRect(0, 0, prevCanvas.width, prevCanvas.height);' .
1218
- 'prevctx.drawImage(image' . $mocc . ',0,0,image' . $mocc . '.width,image' . $mocc . '.height,0,0,prevCanvas.width,prevCanvas.height);' .
1219
-
1220
- // Draw viewport rect on preview image
1221
- 'var factor = prevCanvas.width / image' . $mocc . '.width;' .
1222
- 'prevctx.strokeRect(factor*fromX,factor*fromY,factor*fromWidth,factor*fromHeight);' .
1223
-
1224
- // Done so far
1225
- 'busy = false;' .
1226
-
1227
- // Re-render if needed
1228
- 'if (run>0) {' .
1229
- 'if (manualControl||autorun){setTimeout(function(){render()},25);}' .
1230
- 'else {setTimeout(function(){render()},5);}' .
1231
- '}
1232
- if(run<5)run--;' .
1233
- '}' .
1234
-
1235
- // Previous
1236
- 'function panPrev(e) {
1237
- e.preventDefault();
1238
- abort = true;
1239
- var stop;
1240
- if ( ! stop ) {
1241
- stop = true;
1242
- $(this).css({opacity:0.5});
1243
- $("#wppa-overlay-ic").css({display:"none"});
1244
- $("#wppa-ovl-spin").show();
1245
- wppaOvlShowPrev();
1246
- }
1247
- }' .
1248
-
1249
- // Next
1250
- 'function panNext(e) {
1251
- e.preventDefault();
1252
- abort = true;
1253
- var stop;
1254
- if ( ! stop ) {
1255
- stop = true;
1256
- $(this).css({opacity:0.5});
1257
- $("#wppa-overlay-ic").css({display:"none"});
1258
- $("#wppa-ovl-spin").show();
1259
- wppaOvlShowNext();
1260
- }
1261
- }' .
1262
-
1263
- // Horizontal movement by button
1264
- 'function onRightMouseDown(e){
1265
- e.preventDefault();
1266
- run=5;deltaX=3;render();
1267
- }' .
1268
-
1269
- 'function onLeftMouseDown(e){
1270
- e.preventDefault();
1271
- run=5;deltaX=-3;render();
1272
- }' .
1273
-
1274
- // Vertical movement by button
1275
- 'function onUpMouseDown(e){
1276
- e.preventDefault();
1277
- run=5;deltaY=-3;render();
1278
- }' .
1279
-
1280
- 'function onDownMouseDown(e){
1281
- e.preventDefault();
1282
- run=5;deltaY=3;render();
1283
- }' .
1284
-
1285
- // Zooming
1286
- 'function onZoomInMouseDown(e){
1287
- e.preventDefault();
1288
- run=5;deltaFactor=1.005;render();
1289
- }' .
1290
-
1291
- 'function onZoomOutMouseDown(e){
1292
- e.preventDefault();
1293
- run=5;deltaFactor=0.995;render();
1294
- }' .
1295
-
1296
- // Mouse wheel
1297
- 'function onDivWheel(e) {
1298
- e.preventDefault();
1299
- run=(autorun?5:4);
1300
- deltaFactor = 1 + e.deltaY * zoomsensitivity / 1000;
1301
- if ( ! autorun ) render();
1302
- setTimeout(function(){deltaFactor = 1}, 25);
1303
- e.stopPropagation();
1304
- }' .
1305
-
1306
- // When a navigation button is released, stop and reset all deltas
1307
- 'function onButtonUp(e) {
1308
- e.preventDefault();
1309
- deltaX=0;deltaY=0;deltaFactor=1;
1310
- if ( ! ' . $lightbox . ' ) run--;
1311
- run=4;
1312
- }' .
1313
-
1314
- // When a (responsive) resize is required, we resize the wppaScene
1315
- 'function onResize' . $mocc . '(e){' .
1316
-
1317
- 'if (abort) return;' .
1318
-
1319
- ( $lightbox ?
1320
-
1321
- // Show image container
1322
- '$("#wppa-overlay-ic").css("display", "");' .
1323
-
1324
- // There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
1325
- 'var widthIsLim,
1326
- modeIsNormal = wppaOvlMode == "normal";' .
1327
-
1328
- // First find container dimensions dependant of mode
1329
- 'var contWidth, contHeight;
1330
-
1331
- if ( modeIsNormal ) {
1332
- contWidth = window.innerWidth ? window.innerWidth : screen.width;
1333
- contHeight = window.innerHeight ? window.innerHeight : screen.height;
1334
- }
1335
- else {
1336
- contWidth = screen.width;
1337
- contHeight = screen.height;
1338
- }
1339
- newWidth = parseInt(newWidth);
1340
- newHeight = parseInt(newHeight);
1341
- ' .
1342
-
1343
- // Initialize new display sizes
1344
- 'var newWidth,
1345
- newHeight,
1346
- topMarg,
1347
- leftMarg,
1348
- extraX = 8,
1349
- extraY = 24 + ' . ( $controls ? $icsiz : 0 ) . ' + contWidth * ' . $height . ' / ' . $width . ' + 40;' .
1350
-
1351
- // Add borderwidth in case of mode == normal
1352
- 'if ( modeIsNormal ) {
1353
- extraX += 2 * ' . wppa_opt( 'ovl_border_width' ) . ';
1354
- extraY += 2 * ' . wppa_opt( 'ovl_border_width' ) . ';
1355
- }
1356
- ' .
1357
-
1358
- // Find out if the width is the limitng dimension
1359
- 'widthIsLim = ( contHeight > ( ( contWidth / 2 ) + extraY ) );' .
1360
-
1361
- // Compute new sizes and margins
1362
- 'if ( widthIsLim ) {
1363
- newWidth = contWidth - extraX;
1364
- newHeight = newWidth / 2;
1365
- topMarg = ( contHeight - newHeight - extraY ) / 2 + 20;' .
1366
- '}
1367
- else {
1368
- newWidth = 2 * ( contHeight - ' . ( $controls ? $icsiz : 0 ) . ' - 24 - 40 ) / ( 1 + 2 * ' . $height . ' / ' . $width . ' );
1369
- newHeight = newWidth / 2;
1370
- topMarg = 20;' .
1371
-
1372
- '}' .
1373
-
1374
- // Set css common for all 4 situations
1375
- '$("#wppa-ovl-pan-container").css({marginTop:topMarg});
1376
- $("#wppa-overlay-ic").css({marginTop:0});
1377
-
1378
- canvas.width = newWidth;
1379
- canvas.height = newHeight;
1380
- prevCanvas.width = newWidth;
1381
- prevCanvas.height = newWidth * ' . $height . ' / ' . $width . ';' .
1382
-
1383
- // Now set css for all 4 situations: Mode is normal
1384
- 'if ( modeIsNormal ) {' .
1385
-
1386
- // Common for mode normal
1387
- '$("#wppa-ovl-pan-container").css({
1388
- backgroundColor:"' . wppa_opt( 'ovl_theme' ) . '",
1389
- padding:"' . wppa_opt( 'ovl_border_width' ) . 'px",
1390
- borderRadius:"' . wppa_opt( 'ovl_border_radius' ) . 'px",
1391
- width:newWidth,
1392
- marginLeft:0
1393
- });
1394
- $( "#wppa-pctl-div-' . $mocc . '" ).css({marginLeft:0});' .
1395
-
1396
- // Limit specific
1397
- 'if ( widthIsLim ) {
1398
- $("#wppa-overlay-ic").css({marginLeft:4});
1399
- }
1400
- else {
1401
- $("#wppa-overlay-ic").css({marginLeft:(contWidth-newWidth)/2});
1402
- }
1403
-
1404
- }' .
1405
-
1406
- // Mode is fullscreen
1407
- 'else {' .
1408
-
1409
- // Common for mode fullscreen
1410
- '$("#wppa-overlay-ic").css({marginLeft:0});
1411
- $("#wppa-ovl-pan-container").css({
1412
- backgroundColor:"transparent",
1413
- padding:0,
1414
- borderRadius:0,
1415
- width:newWidth,
1416
- marginLeft:(contWidth-newWidth)/2
1417
- });
1418
- $("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});' .
1419
-
1420
- /*
1421
-
1422
- if ( widthIsLim ) {
1423
- $("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});
1424
- }
1425
- else {
1426
- $("#wppa-pctl-div-' . $mocc . '").css({marginLeft:(contWidth-newWidth)/2});
1427
-
1428
- } */ '
1429
- }' .
1430
-
1431
- 'run=(autorun?5:4);
1432
- render();
1433
-
1434
- ' :
1435
- 'canvasWidth = $(div).parent().width();' .
1436
- 'canvasHeight = canvasWidth / 2;' .
1437
- 'canvas.width = canvasWidth;' .
1438
- 'canvas.height = canvasHeight;' .
1439
- 'prevCanvas.width = canvasWidth;' .
1440
- 'prevCanvas.height = canvasWidth * ' . $height . ' / ' . $width . ';' .
1441
- 'run=(autorun?5:4);' .
1442
- 'render();'
1443
- ) .
1444
1445
- '}' .
1446
1447
- // when the mouse is pressed on the canvas, we switch to manual control and save current coordinates
1448
- 'function onCanvasMouseDown(e){
1449
1450
- e.preventDefault();
1451
1452
- manualControl = true;
1453
1454
- savedCanvasX = e.offsetX;
1455
- savedCanvasY = e.offsetY;
1456
1457
- run=5;
1458
- render();
1459
1460
- }' .
1461
1462
- 'function onCanvasMouseMove(e){
1463
1464
- var factor = canvas.width / fromWidth;
1465
1466
- if ( manualControl ){
1467
1468
- var x = ( savedCanvasX - e.offsetX ) / factor + fromX;
1469
- var y = ( savedCanvasY - e.offsetY ) / factor + fromY;
1470
1471
- if ( x > 0 && y > 0 && ( x + fromWidth ) < image' . $mocc . '.width && ( y + fromHeight ) < image' . $mocc . '.height ) {
1472
1473
- fromX = x;
1474
- fromY = y;
1475
1476
- savedCanvasX = e.offsetX;
1477
- savedCanvasY = e.offsetY;
1478
- }
1479
- }
1480
- }' .
1481
1482
- 'function onPrevCanvasMouseMove(e){
1483
1484
- var factor = prevCanvas.width / image' . $mocc . '.width;
1485
1486
- if (e.offsetX > factor * fromX &&
1487
- e.offsetX < factor * ( fromX + fromWidth ) &&
1488
- e.offsetY > factor * fromY &&
1489
- e.offsetY < factor * ( fromY + fromHeight ) ) {
1490
1491
- $(prevCanvas).css("cursor","grab");
1492
- }
1493
- else {
1494
- $(prevCanvas).css("cursor","default");
1495
- }
1496
1497
- if ( manualControl && !busy ){
1498
1499
- if (e.offsetX > factor * fromX &&
1500
- e.offsetX < factor * ( fromX + fromWidth ) &&
1501
- e.offsetY > factor * fromY &&
1502
- e.offsetY < factor * ( fromY + fromHeight ) ) {
1503
1504
- fromX = ( e.offsetX - savedCanvasX ) / factor + fromX;
1505
- fromY = ( e.offsetY - savedCanvasY ) / factor + fromY;
1506
1507
- savedCanvasX = e.offsetX;
1508
- savedCanvasY = e.offsetY;
1509
1510
- }
1511
- }
1512
- }' .
1513
1514
- 'function onCanvasMouseUp(e){
1515
1516
- if ( manualControl ) {
1517
- run=4;
1518
- manualControl = false;
1519
- }
1520
- }' .
1521
- '}
1522
1523
- </script>
1524
- ' . ( $haslink ? '<a>' : '' ) . '';
1525
1526
- return wppa_pan_min( $result );
1527
}
1528
1529
// Minimize inine mixed html / js code
@@ -1531,35 +1531,35 @@ function wppa_pan_min( $result ) {
1531
// return $result; // debug
1532
// wppa_log('dbg','voor len='.strlen($result));
1533
1534
- // Remove tabs
1535
- $result = str_replace( "\t", '', $result );
1536
1537
- // Remove newlines
1538
- $result = str_replace( array( "\r\n", "\n\r", "\n", "\r" ), ' ', $result );
1539
1540
- // Trim operators
1541
- $result = str_replace( array( ' = ',' + ',' * ',' / ' ), array( '=','+','*','/' ), $result );
1542
1543
- // Replace multiple spaces by one
1544
- $olen = 0;
1545
- $nlen = strlen( $result );
1546
- do {
1547
- $olen = $nlen;
1548
- $result = str_replace( ' ', ' ', $result );
1549
- $nlen = strlen( $result );
1550
- } while ( $nlen != $olen );
1551
1552
- // Trim , ; and !
1553
- $result = str_replace( array( ', ', '; ', '! ' ), array( ',', ';', '!' ), $result );
1554
1555
- // Trim braces
1556
- $result = str_replace( array( ' ) ', ') ', ' )' ), ')', $result );
1557
- $result = str_replace( array( ' ( ', '( ', ' (' ), '(', $result );
1558
1559
- // Remove space between html tags
1560
- $result = str_replace( '> <', '><', $result );
1561
1562
// wppa_log('dbg',' na len='.strlen($result));
1563
// wppa_dump($result);
1564
- return $result;
1565
}
3
* Package: wp-photo-album-plus
4
*
5
* Make the picture html
6
+ * Version 7.2.02
7
*
8
*/
9
28
//
29
function wppa_get_picture_html( $args ) {
30
31
+ // Init
32
+ $defaults = array( 'id' => '0',
33
+ 'type' => '',
34
+ 'class' => '',
35
+ 'width' => false,
36
+ 'height' => false,
37
+ );
38
+ $args = wp_parse_args( $args, $defaults );
39
+
40
+ $id = strval( intval ( $args['id'] ) );
41
+ $type = $args['type'];
42
+ $class = $args['class'];
43
+ $mocc = wppa( 'mocc' );
44
+ if ( wppa_is_pdf( $id ) ) {
45
+ $class = trim( $class . ' smxpdf-' . $mocc );
46
+ $is_pdf = true;
47
+ }
48
+ else {
49
+ $is_pdf = false; }
50
+
51
+ // Check existance of required args
52
+ foreach( array( 'id', 'type' ) as $item ) {
53
+ if ( ! $args[$item] ) {
54
+ wppa_dbg_msg( 'Missing ' . $item . ' in call to wppa_get_picture_html()', 'red' );
55
+ return false;
56
+ }
57
+ }
58
+
59
+ // Check validity of args
60
+ if ( ! wppa_photo_exists( $id ) ) {
61
+ wppa_dbg_msg( 'Photo ' . $id . ' does not exist in call to wppa_get_picture_html(). Type = ' . $type, 'red', 'force' );
62
+ return false;
63
+ }
64
+ $types = array( 'sphoto', // Single image with optional border like slideshow border
65
+ 'mphoto', // Media type like single image. Caption should be provided in wrappping div
66
+ 'xphoto', // Like xphoto with extended features
67
+ 'cover', // Album cover image
68
+ 'thumb', // Normal tumbnail
69
+ 'ttthumb', // Topten
70
+ 'comthumb', // Comment widget
71
+ 'fthumb', // Filmthumb
72
+ 'twthumb', // Thumbnail widget
73
+ 'ltthumb', // Lasten widget
74
+ 'albthumb', // Album widget
75
+ );
76
+ if ( ! in_array( $type, $types ) ) {
77
+ wppa_dbg_msg( 'Unimplemented type ' . $type . ' in call to wppa_get_picture_html()', 'red', 'force' );
78
+ return false;
79
+ }
80
+
81
+ // Get other data
82
+ $link = wppa_get_imglnk_a( $type, $id );
83
+ $isthumb = strpos( $type, 'thumb' ) !== false;
84
+ $file = $isthumb ? wppa_get_thumb_path( $id ) : wppa_get_photo_path( $id );
85
+
86
+ if ( $args['width'] && $args['height'] ) {
87
+ $href = $isthumb ? wppa_get_thumb_url( $id, true, '', $args['width'], $args['height'] ) :
88
+ wppa_get_photo_url( $id, true, '', $args['width'], $args['height'] );
89
+ }
90
+ else {
91
+ $href = $isthumb ? wppa_get_thumb_url( $id ) : wppa_get_photo_url( $id );
92
+ }
93
+ if ( $is_pdf ) {
94
+ $href = wppa_get_hires_url( $id );
95
+ }
96
+
97
+ $autocol = wppa( 'auto_colwidth' ) || ( wppa( 'fullsize' ) > 0 && wppa( 'fullsize' ) <= 1.0 );
98
+ $title = $link ? esc_attr( $link['title'] ) : esc_attr( stripslashes( wppa_get_photo_name( $id ) ) );
99
+ $alt = wppa_get_imgalt( $id );
100
+
101
+ // Find image style
102
+ switch ( $type ) {
103
+ case 'sphoto':
104
+ $style = 'width:100%;margin:0;';
105
+ if ( ! wppa_in_widget() ) {
106
+ switch ( wppa_opt( 'fullimage_border_width' ) ) {
107
+ case '':
108
+ $style .= 'padding:0;' .
109
+ 'border:none;';
110
+ break;
111
+ case '0':
112
+ $style .= 'padding:0;' .
113
+ 'border:1px solid ' . wppa_opt( 'bcolor_fullimg' ) . ';' .
114
+ 'box-sizing:border-box;';
115
+ break;
116
+ default:
117
+ $style .= 'padding:' . ( wppa_opt( 'fullimage_border_width' ) - '1' ) . 'px;' .
118
+ 'border:1px solid ' . wppa_opt( 'bcolor_fullimg' ) . ';' .
119
+ 'box-sizing:border-box;' .
120
+ 'background-color:' . wppa_opt( 'bgcolor_fullimg' ) . ';';
121
+
122
+ // If we do round corners...
123
+ if ( wppa_opt( 'bradius' ) > '0' ) {
124
+
125
+ // then also here
126
+ $style .= 'border-radius:' . wppa_opt( 'fullimage_border_width' ) . 'px;';
127
+ }
128
+ }
129