Version Description
- This version addresses various minor bug fixes and feature requests.
Download this release
Release Info
Developer | opajaap |
Plugin | WP Photo Album Plus |
Version | 6.9.10 |
Comparing to | |
See all releases |
Code changes from version 6.9.09 to 6.9.10
- changelog.txt +10 -0
- js/wppa-lightbox.js +26 -12
- js/wppa-lightbox.min.js +1 -1
- js/wppa.js +2 -4
- js/wppa.min.js +1 -1
- readme.txt +6 -2
- wppa-picture.php +253 -191
- wppa.php +3 -3
changelog.txt
CHANGED
@@ -1,5 +1,15 @@
|
|
1 |
WP Photo Album Plus Changelog
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 6.9.09 =
|
4 |
|
5 |
= New Features =
|
1 |
WP Photo Album Plus Changelog
|
2 |
|
3 |
+
= 6.9.10 =
|
4 |
+
|
5 |
+
= Bug Fixes =
|
6 |
+
|
7 |
+
* Lightbox on a single image did no longer work on images that are not a panorama. Fixed.
|
8 |
+
|
9 |
+
= Other Changes =
|
10 |
+
|
11 |
+
* Increase stability and reduced codesize for panoramas.
|
12 |
+
|
13 |
= 6.9.09 =
|
14 |
|
15 |
= New Features =
|
js/wppa-lightbox.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
// Conatins lightbox modules
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
//
|
6 |
-
var wppaLightboxVersion = '6.9.
|
7 |
|
8 |
// Global inits
|
9 |
var wppaNormsBtnOpac = 0.75;
|
@@ -334,7 +334,7 @@ wppaConsoleLog( 'wppaOvlShow arg=' + arg );
|
|
334 |
wppaOvlAudioHtmls[0] = jQuery( arg ).attr( 'data-audiohtml' ) ? decodeURI( jQuery( arg ).attr( 'data-audiohtml' ) ) : '';
|
335 |
wppaOvlVideoNaturalWidths[0] = jQuery( arg ).attr( 'data-videonatwidth' ) ? jQuery( arg ).attr( 'data-videonatwidth' ) : '';
|
336 |
wppaOvlVideoNaturalHeights[0] = jQuery( arg ).attr( 'data-videonatheight' ) ? jQuery( arg ).attr( 'data-videonatheight' ) : '';
|
337 |
-
panData = jQuery( arg ).attr( 'data-panorama' );
|
338 |
|
339 |
if ( panData.length > 0 ) {
|
340 |
wppaOvlHasPanoramas = true;
|
@@ -372,7 +372,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
|
|
372 |
|
373 |
// Show spinner
|
374 |
if ( wppaOvlFirst ) {
|
375 |
-
jQuery( "#wppa-ovl-spin" ).
|
376 |
}
|
377 |
|
378 |
// Find handy switches
|
@@ -387,7 +387,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
|
|
387 |
wppaConsoleLog( 'Preloading ' + ( idx + 1 ) + '/' + wppaOvlUrls.length + ' (current)' );
|
388 |
if ( ! wppaIsIe && ! wppaOvlImgs[idx].complete && wppaOvlOpen ) {
|
389 |
wppaConsoleLog( 'Retrying preload current image' );
|
390 |
-
setTimeout( '_wppaOvlShow(' + idx + ')',
|
391 |
return;
|
392 |
}
|
393 |
}
|
@@ -446,7 +446,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
|
|
446 |
}
|
447 |
else {
|
448 |
wppaOvlActivePanorama = 0;
|
449 |
-
jQuery( '#wppa-overlay-ic' ).css({top:'50%',left:'50%'});
|
450 |
}
|
451 |
|
452 |
// Fullsize?
|
@@ -574,7 +574,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
|
|
574 |
|
575 |
// If panorama and single, hide panorama browse buttons
|
576 |
if ( wppaOvlPanoramaIds[idx] > 0 && wppaOvlIsSingle ) {
|
577 |
-
jQuery( '.wppa-
|
578 |
}
|
579 |
|
580 |
// Disable right mouse button optionally
|
@@ -582,7 +582,7 @@ wppaConsoleLog( '_wppaOvlShow, idx='+idx );
|
|
582 |
|
583 |
|
584 |
wppaOvlIsVideo = wppaIsVideo;
|
585 |
-
setTimeout( 'wppaOvlFormatFull()',
|
586 |
if ( wppaIsVideo || wppaHasAudio ) {
|
587 |
setTimeout( 'wppaOvlUpdateFsId()', 20 );
|
588 |
}
|
@@ -990,7 +990,7 @@ wppaConsoleLog( 'wppaOvlSize' );
|
|
990 |
else {
|
991 |
|
992 |
// Remove spinner
|
993 |
-
jQuery( '#wppa-ovl-spin' ).
|
994 |
wppaConsoleLog( 'Done '+wppaOvlIdx );
|
995 |
wppaOvlFirst = false;
|
996 |
}
|
@@ -1001,8 +1001,12 @@ wppaConsoleLog( 'wppaOvlSize' );
|
|
1001 |
function wppaOvlFormatFull() {
|
1002 |
wppaConsoleLog( 'wppaOvlFormatFull '+wppaOvlMode );
|
1003 |
|
1004 |
-
// Panoramas do their own
|
1005 |
if ( wppaOvlActivePanorama > 0 ) {
|
|
|
|
|
|
|
|
|
1006 |
return;
|
1007 |
}
|
1008 |
|
@@ -1099,7 +1103,7 @@ wppaConsoleLog( 'wppaOvlFormatFull '+wppaOvlMode );
|
|
1099 |
jQuery( '#wppa-ovl-full-bg' ).css({overflow:Overflow});
|
1100 |
jQuery( '#wppa-ovl-full-bg' ).scrollTop( scrollTop );
|
1101 |
jQuery( '#wppa-ovl-full-bg' ).scrollLeft( scrollLeft );
|
1102 |
-
jQuery( '#wppa-ovl-spin' ).
|
1103 |
|
1104 |
return true; // Done!
|
1105 |
}
|
@@ -1241,6 +1245,9 @@ wppaConsoleLog( 'wppaOvlShowPrev' );
|
|
1241 |
function wppaOvlShowNext() {
|
1242 |
wppaConsoleLog( 'wppaOvlShowNext' );
|
1243 |
|
|
|
|
|
|
|
1244 |
wppaOvlFsPhotoId = 0;
|
1245 |
wppaPhotoId = 0;
|
1246 |
|
@@ -1279,12 +1286,15 @@ wppaConsoleLog( 'wppaOvlHide' );
|
|
1279 |
wppaOvlRunning = false;
|
1280 |
wppaOvlMode = wppaOvlModeInitial;
|
1281 |
wppaNormsBtnOpac = 0.75;
|
1282 |
-
jQuery( '#wppa-ovl-spin' ).
|
1283 |
|
1284 |
// Remove fs and exit buttons
|
1285 |
jQuery( '#wppa-fulls-btn' ).stop().fadeOut( 300 );
|
1286 |
jQuery( '#wppa-exit-btn' ).stop().fadeOut( 300 );
|
1287 |
|
|
|
|
|
|
|
1288 |
// Stop any panorama from running the renderer
|
1289 |
wppaOvlActivePanorama = 0;
|
1290 |
|
@@ -1404,8 +1414,12 @@ wppaConsoleLog( 'wppaInitOverlay' );
|
|
1404 |
function wppaOvlResize() {
|
1405 |
wppaConsoleLog( 'wppaOvlResize' );
|
1406 |
|
1407 |
-
//
|
1408 |
if ( wppaOvlActivePanorama > 0 ) {
|
|
|
|
|
|
|
|
|
1409 |
return;
|
1410 |
}
|
1411 |
|
3 |
// Conatins lightbox modules
|
4 |
// Dependancies: wppa.js and default wp jQuery library
|
5 |
//
|
6 |
+
var wppaLightboxVersion = '6.9.10';
|
7 |
|
8 |
// Global inits
|
9 |
var wppaNormsBtnOpac = 0.75;
|
334 |
wppaOvlAudioHtmls[0] = jQuery( arg ).attr( 'data-audiohtml' ) ? decodeURI( jQuery( arg ).attr( 'data-audiohtml' ) ) : '';
|
335 |
wppaOvlVideoNaturalWidths[0] = jQuery( arg ).attr( 'data-videonatwidth' ) ? jQuery( arg ).attr( 'data-videonatwidth' ) : '';
|
336 |
wppaOvlVideoNaturalHeights[0] = jQuery( arg ).attr( 'data-videonatheight' ) ? jQuery( arg ).attr( 'data-videonatheight' ) : '';
|
337 |
+
panData = jQuery( arg ).attr( 'data-panorama' ) ? jQuery( arg ).attr( 'data-panorama' ) : '';
|
338 |
|
339 |
if ( panData.length > 0 ) {
|
340 |
wppaOvlHasPanoramas = true;
|
372 |
|
373 |
// Show spinner
|
374 |
if ( wppaOvlFirst ) {
|
375 |
+
jQuery( "#wppa-ovl-spin" ).show();
|
376 |
}
|
377 |
|
378 |
// Find handy switches
|
387 |
wppaConsoleLog( 'Preloading ' + ( idx + 1 ) + '/' + wppaOvlUrls.length + ' (current)' );
|
388 |
if ( ! wppaIsIe && ! wppaOvlImgs[idx].complete && wppaOvlOpen ) {
|
389 |
wppaConsoleLog( 'Retrying preload current image' );
|
390 |
+
setTimeout( '_wppaOvlShow(' + idx + ')', 500 );
|
391 |
return;
|
392 |
}
|
393 |
}
|
446 |
}
|
447 |
else {
|
448 |
wppaOvlActivePanorama = 0;
|
449 |
+
jQuery( '#wppa-overlay-ic' ).css({top:'50%',left:'50%',display:'block'});
|
450 |
}
|
451 |
|
452 |
// Fullsize?
|
574 |
|
575 |
// If panorama and single, hide panorama browse buttons
|
576 |
if ( wppaOvlPanoramaIds[idx] > 0 && wppaOvlIsSingle ) {
|
577 |
+
jQuery( '.wppa-pan-prevnext' ).hide();
|
578 |
}
|
579 |
|
580 |
// Disable right mouse button optionally
|
582 |
|
583 |
|
584 |
wppaOvlIsVideo = wppaIsVideo;
|
585 |
+
setTimeout( 'wppaOvlFormatFull()', 10 );
|
586 |
if ( wppaIsVideo || wppaHasAudio ) {
|
587 |
setTimeout( 'wppaOvlUpdateFsId()', 20 );
|
588 |
}
|
990 |
else {
|
991 |
|
992 |
// Remove spinner
|
993 |
+
jQuery( '#wppa-ovl-spin' ).hide();
|
994 |
wppaConsoleLog( 'Done '+wppaOvlIdx );
|
995 |
wppaOvlFirst = false;
|
996 |
}
|
1001 |
function wppaOvlFormatFull() {
|
1002 |
wppaConsoleLog( 'wppaOvlFormatFull '+wppaOvlMode );
|
1003 |
|
1004 |
+
// Panoramas do their own resize
|
1005 |
if ( wppaOvlActivePanorama > 0 ) {
|
1006 |
+
setTimeout(function(){
|
1007 |
+
wppaConsoleLog('kicking panorama');
|
1008 |
+
jQuery(window).trigger("kickpanorama");
|
1009 |
+
},125);
|
1010 |
return;
|
1011 |
}
|
1012 |
|
1103 |
jQuery( '#wppa-ovl-full-bg' ).css({overflow:Overflow});
|
1104 |
jQuery( '#wppa-ovl-full-bg' ).scrollTop( scrollTop );
|
1105 |
jQuery( '#wppa-ovl-full-bg' ).scrollLeft( scrollLeft );
|
1106 |
+
jQuery( '#wppa-ovl-spin' ).hide();
|
1107 |
|
1108 |
return true; // Done!
|
1109 |
}
|
1245 |
function wppaOvlShowNext() {
|
1246 |
wppaConsoleLog( 'wppaOvlShowNext' );
|
1247 |
|
1248 |
+
// Show spinner
|
1249 |
+
jQuery( '#wppa-ovl-spin' ).show();
|
1250 |
+
|
1251 |
wppaOvlFsPhotoId = 0;
|
1252 |
wppaPhotoId = 0;
|
1253 |
|
1286 |
wppaOvlRunning = false;
|
1287 |
wppaOvlMode = wppaOvlModeInitial;
|
1288 |
wppaNormsBtnOpac = 0.75;
|
1289 |
+
jQuery( '#wppa-ovl-spin' ).hide();
|
1290 |
|
1291 |
// Remove fs and exit buttons
|
1292 |
jQuery( '#wppa-fulls-btn' ).stop().fadeOut( 300 );
|
1293 |
jQuery( '#wppa-exit-btn' ).stop().fadeOut( 300 );
|
1294 |
|
1295 |
+
// Remove spinner
|
1296 |
+
jQuery( '#wppa-ovl-spin' ).hide();
|
1297 |
+
|
1298 |
// Stop any panorama from running the renderer
|
1299 |
wppaOvlActivePanorama = 0;
|
1300 |
|
1414 |
function wppaOvlResize() {
|
1415 |
wppaConsoleLog( 'wppaOvlResize' );
|
1416 |
|
1417 |
+
// Panoramas do their own resize
|
1418 |
if ( wppaOvlActivePanorama > 0 ) {
|
1419 |
+
setTimeout(function(){
|
1420 |
+
wppaConsoleLog('kicking panorama');
|
1421 |
+
jQuery(window).trigger("kickpanorama");
|
1422 |
+
},125);
|
1423 |
return;
|
1424 |
}
|
1425 |
|
js/wppa-lightbox.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaLightboxVersion="6.9.09",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaOvlActivePanorama=0,wppaOvlHasPanoramas=!1,wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;a=null==p?event.keyCode:p.keyCode,e=27;var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"d":jQuery("#wppa-ovl-legenda-1").css("visibility","hidden"),jQuery("#wppa-ovl-legenda-2").css("visibility","hidden"),wppaShowLegenda="hidden";break;case"f":wppaOvlFull();break;case"l":wppaOvlNorm();break;case"q":case"x":wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(p){wppaConsoleLog("wppaOvlFull"),wppaNormsBtnOpac=.75;var a=wppaOvlMode;p||wppaOvlStepMode();var e=document.getElementById("wppa-overlay-ic");e&&((p||"normal"==a)&&(e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50)),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},30),jQuery("#wppa-ovl-legenda-1").html(""))}function wppaOvlNorm(p){wppaConsoleLog("wppaOvlNorm"),wppaOvlMode="normal",wppaNormsBtnOpac=.75,document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),p?wppaOvlMode=wppaOvlModeInitial:(setTimeout(function(){wppaShowFsButtons(.75)},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlShow(p){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){wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlImgs=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!1;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),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")):"",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),o.href==p.href&&(wppaOvlIdx=r),r++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",0<(a=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),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").fadeIn(500),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[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+")",100);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)))),wppaPhotoId=wppaUrlToId(wppaOvlUrls[p]),_bumpViewCount(wppaPhotoId),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%"})),"normal"!=wppaOvlMode||wppaOvlActivePanorama){wppaOvlActivePanorama?l=wppaOvlPanoramaHtml[p]:(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';\" >":(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-panorama-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout("wppaOvlFormatFull()",1),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):(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" src="'+wppaOvlUrls[p]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),wppaOvlIsVideo=!1),!wppaOvlShowStartStop||wppaOvlIsSingle||wppaIsVideo||(l+='<div id="wppa-ovl-start-stop-btn" class="wppa-ovl-nav-btn" style="z-index:100101;position:absolute;top:50%;margin-top:-24px;left:50%;margin-left:-24px;'+(-1==wppaOvlIdx?"visibility:hidden;":"")+"box-shadow:none;"+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlStartStop()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button","48px",!0,!0,"0","20","50","50")+"</div>"),wppaOvlIsSingle||(l+='<div id="wppa-ovl-prev-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;left:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowPrev()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Prev-Button","48px",!0,!0)+"</div>",l+='<div id="wppa-ovl-next-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;right:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowNext()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Next-Button","48px",!0,!0)+"</div>"),l+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+o+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >'+(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p]+"</div>",jQuery("#wppa-overlay-ic").html(l),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=jQuery(window).width(),v=jQuery(window).height();wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],l=wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):(t=a.clientWidth,o=a.naturalWidth,l=a.naturalHeight),void 0===o&&(o=a.clientWidth,l=a.clientHeight),(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();"auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),w=v-s-20-2*wppaOvlBorderWidth):w=v-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth;var u=parseInt(w*o/l),O=(wppaOvlPadTop,parseInt((d-u)/2),u);l<w&&(wppaOvlPadTop+(w-l)/2,parseInt((d-o)/2),O=o);var h=wppaSavedImageWidth-O<3&&O-wppaSavedImageWidth<3;return O<=10&&(l=180,h=!(o=O=240)),O=parseInt(O),wppaSavedImageWidth=parseInt(O),wppaSavedImageHeight=parseInt(O*l/o),wppaSavedMarginLeft=-parseInt(O/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(O+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),h?(jQuery("#wppa-ovl-spin").stop().fadeOut(),wppaConsoleLog("Done "+wppaOvlIdx),wppaOvlFirst=!1):(setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),wppaConsoleLog("Not done "+wppaOvlIdx+" saved="+wppaSavedImageWidth+", wid="+O+", cw="+t+", nw="+o+", img complete="+document.getElementById("wppa-overlay-img").complete)),!0}wppaOvlFormatFull()}else wppaConsoleLog("Lb quitted")}}function wppaOvlFormatFull(){if(wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode),!(0<wppaOvlActivePanorama)){var p,a,e;if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout("wppaOvlFormatFull()",10);a=p.naturalWidth,e=p.naturalHeight}var t=screen.width/screen.height,o=a/e,l=0,i=0,n=0,r=0,w=0,d=0,v="hidden";switch(wppaOvlMode){case"padded":o<t?(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,r=screen.height*o):(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,r=screen.width);break;case"stretched":i=l=0,n=screen.height,r=screen.width;break;case"clipped":o<t?(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,r=screen.width):(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,r=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").stop().fadeOut(),!0}}function wppaOvlUpdateFsId(){wppaConsoleLog("wppaOvlUpdateFsId"),wppaOvlFsPhotoId=wppaPhotoId}function wppaOvlStartAudio(){wppaConsoleLog("wppaOvlStartAudio");var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&(p.play(),wppaConsoleLog("Audio play wppa-overlay-audio"))}function wppaOvlStepMode(){wppaConsoleLog("wppaOvlStepMode from "+wppaOvlMode);for(var p=new Array("normal","padded","stretched","clipped","realsize","padded"),a=0;a<p.length;){if(wppaOvlMode==p[a])return wppaOvlMode=p[a+1],void wppaOvlShow(wppaOvlIdx);a++}}function wppaOvlStartStop(){wppaConsoleLog("wppaOvlStartStop called. Running="+wppaOvlRunning),wppaOvlRunning?(wppaOvlRunning=!1,jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button","48px",!0,!0,"0","20","50","50")),-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&jQuery("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&jQuery("#wppa-ovl-next-btn").css("visibility","visible"))):(jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml((wppaOvlRunning,"Pause-Button"),"48px",!0,!0,"0","20","50","50")),wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaConsoleLog("wppaOvlRun, running="+wppaOvlRunning),wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",50);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",50)}var a;a=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1,wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(a),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaConsoleLog("wppaOvlShowPrev"),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIsSingle||(wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1)),!1}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIsSingle||(wppaOvlIdx>=wppaOvlUrls.length-1&&(wppaOvlIdx=-1),wppaOvlShow(wppaOvlIdx+1)),!1}function wppaOvlHide(){wppaConsoleLog("wppaOvlHide"),wppaStopAudio(),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),jQuery("#wppa-overlay-ic").html(""),jQuery("#wppa-overlay-bg").fadeOut(300),jQuery(document).off("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!1,wppaOvlFirst=!0,wppaOvlRunning=!1,wppaOvlMode=wppaOvlModeInitial,wppaNormsBtnOpac=.75,jQuery("#wppa-ovl-spin").stop().fadeOut(),jQuery("#wppa-fulls-btn").stop().fadeOut(300),jQuery("#wppa-exit-btn").stop().fadeOut(300),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++)p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0]&&(wppaWppaOverlayActivated=!0,jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),jQuery(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto"));wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange)}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),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,wppaLightboxVersion="6.9.10",wppaNormsBtnOpac=.75,wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlMode="",wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlFsExitBtnSize="48",wppaOvlActivePanorama=0,wppaOvlHasPanoramas=!1,wppaSavedContainerWidth=0;function wppaDoOnOrientationChange(p){"normal"!=wppaOvlMode&&document.getElementById("wppa-overlay-img")&&setTimeout("wppaOvlShow( "+wppaOvlIdx+" )",10)}function wppaOvlKeyboardHandler(p){var a,e;a=null==p?event.keyCode:p.keyCode,e=27;var t=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(t){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"d":jQuery("#wppa-ovl-legenda-1").css("visibility","hidden"),jQuery("#wppa-ovl-legenda-2").css("visibility","hidden"),wppaShowLegenda="hidden";break;case"f":wppaOvlFull();break;case"l":wppaOvlNorm();break;case"q":case"x":wppaStopVideo(mocc),"normal"!=wppaOvlMode&&wppaOvlNorm(!0),wppaOvlHide()}return!1}function wppaOvlFull(p){wppaConsoleLog("wppaOvlFull"),wppaNormsBtnOpac=.75;var a=wppaOvlMode;p||wppaOvlStepMode();var e=document.getElementById("wppa-overlay-ic");e&&((p||"normal"==a)&&(e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50)),"normal"==wppaOvlMode&&(document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()),setTimeout(function(){wppaShowFsButtons(.75)},30),jQuery("#wppa-ovl-legenda-1").html(""))}function wppaOvlNorm(p){wppaConsoleLog("wppaOvlNorm"),wppaOvlMode="normal",wppaNormsBtnOpac=.75,document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),p?wppaOvlMode=wppaOvlModeInitial:(setTimeout(function(){wppaShowFsButtons(.75)},30),setTimeout(function(){wppaOvlShow(wppaOvlIdx)},50))}function wppaOvlShow(p){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){wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlImgs=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!1;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),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")):"",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),o.href==p.href&&(wppaOvlIdx=r),r++)}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",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),wppaOvlCurIdx=p,wppaOvlFirst&&jQuery("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[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)))),wppaPhotoId=wppaUrlToId(wppaOvlUrls[p]),_bumpViewCount(wppaPhotoId),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]:(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';\" >":(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):(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" src="'+wppaOvlUrls[p]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),wppaOvlIsVideo=!1),!wppaOvlShowStartStop||wppaOvlIsSingle||wppaIsVideo||(l+='<div id="wppa-ovl-start-stop-btn" class="wppa-ovl-nav-btn" style="z-index:100101;position:absolute;top:50%;margin-top:-24px;left:50%;margin-left:-24px;'+(-1==wppaOvlIdx?"visibility:hidden;":"")+"box-shadow:none;"+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlStartStop()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button","48px",!0,!0,"0","20","50","50")+"</div>"),wppaOvlIsSingle||(l+='<div id="wppa-ovl-prev-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;left:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowPrev()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Prev-Button","48px",!0,!0)+"</div>",l+='<div id="wppa-ovl-next-btn" class="wppa-ovl-nav-btn" style="position:absolute;z-index:100101;width:48px;top:50%;margin-top:-24px;right:1px;box-shadow:none;'+(wppaOvlFirst?"opacity:1;":"opacity:0;")+'" onclick="wppaOvlShowNext()" onmouseover="jQuery(this).stop().fadeTo(200,1);" onmouseout="jQuery(this).stop().fadeTo(200,0);" ontouchstart="jQuery(this).stop().fadeTo(200,1);" onload="jQuery(this).stop().fadeTo(5000,0);" >'+wppaSvgHtml("Next-Button","48px",!0,!0)+"</div>"),l+="</div>";var i=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+o+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >'+(i?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p]+"</div>",jQuery("#wppa-overlay-ic").html(l),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=jQuery(window).width(),v=jQuery(window).height();wppaOvlIsVideo?(t=a.clientWidth,o=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],l=wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):(t=a.clientWidth,o=a.naturalWidth,l=a.naturalHeight),void 0===o&&(o=a.clientWidth,l=a.clientHeight),(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();"auto"==wppaOvlTxtHeight?(0==s&&(s=20+2*wppaOvlBorderWidth),w=v-s-20-2*wppaOvlBorderWidth):w=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")}}function wppaOvlFormatFull(){if(wppaConsoleLog("wppaOvlFormatFull "+wppaOvlMode),!(0<wppaOvlActivePanorama)){var p,a,e;if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),a=wppaOvlVideoNaturalWidths[wppaOvlIdx],e=wppaOvlVideoNaturalHeights[wppaOvlIdx];else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout("wppaOvlFormatFull()",10);a=p.naturalWidth,e=p.naturalHeight}var t=screen.width/screen.height,o=a/e,l=0,i=0,n=0,r=0,w=0,d=0,v="hidden";switch(wppaOvlMode){case"padded":o<t?(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,r=screen.height*o):(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,r=screen.width);break;case"stretched":i=l=0,n=screen.height,r=screen.width;break;case"clipped":o<t?(l=0,i=(screen.height-screen.width/o)/2,n=screen.width/o,r=screen.width):(l=(screen.width-screen.height*o)/2,i=0,n=screen.height,r=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}setTimeout(function(){wppaConsoleLog("kicking panorama"),jQuery(window).trigger("kickpanorama")},125)}function wppaOvlUpdateFsId(){wppaConsoleLog("wppaOvlUpdateFsId"),wppaOvlFsPhotoId=wppaPhotoId}function wppaOvlStartAudio(){wppaConsoleLog("wppaOvlStartAudio");var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&(p.play(),wppaConsoleLog("Audio play wppa-overlay-audio"))}function wppaOvlStepMode(){wppaConsoleLog("wppaOvlStepMode from "+wppaOvlMode);for(var p=new Array("normal","padded","stretched","clipped","realsize","padded"),a=0;a<p.length;){if(wppaOvlMode==p[a])return wppaOvlMode=p[a+1],void wppaOvlShow(wppaOvlIdx);a++}}function wppaOvlStartStop(){wppaConsoleLog("wppaOvlStartStop called. Running="+wppaOvlRunning),wppaOvlRunning?(wppaOvlRunning=!1,jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml(wppaOvlRunning?"Pause-Button":"Play-Button","48px",!0,!0,"0","20","50","50")),-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&jQuery("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&jQuery("#wppa-ovl-next-btn").css("visibility","visible"))):(jQuery("#wppa-ovl-start-stop-btn").html(wppaSvgHtml((wppaOvlRunning,"Pause-Button"),"48px",!0,!0,"0","20","50","50")),wppaOvlRunning=!0,wppaOvlRun())}function wppaOvlRun(){if(wppaConsoleLog("wppaOvlRun, running="+wppaOvlRunning),wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout("wppaOvlRun()",50);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return wppaConsoleLog("Wait during run"),void setTimeout("wppaOvlRun()",50)}var a;a=wppaOvlIdx>=wppaOvlUrls.length-1?0:wppaOvlIdx+1,wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlShow(a),setTimeout("wppaOvlRun()",wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){return wppaConsoleLog("wppaOvlShowPrev"),wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlIsSingle||(wppaOvlIdx<1&&(wppaOvlIdx=wppaOvlUrls.length),wppaOvlShow(wppaOvlIdx-1)),!1}function wppaOvlShowNext(){return wppaConsoleLog("wppaOvlShowNext"),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),wppaKbHandlerInstalled=!1,wppaOvlFirst=!0,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++)p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0]&&(wppaWppaOverlayActivated=!0,jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),jQuery(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto"));wppaIsMobile&&window.addEventListener("orientationchange",wppaDoOnOrientationChange)}function wppaOvlResize(){wppaConsoleLog("wppaOvlResize"),0<wppaOvlActivePanorama?setTimeout(function(){wppaConsoleLog("kicking panorama"),jQuery(window).trigger("kickpanorama")},125):(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout("wppaOvlStartAudio()",100))}function wppaShowFsButtons(p){void 0!==p&&(wppaNormsBtnOpac=p),jQuery("#wppa-exit-btn").stop().fadeTo(3,wppaNormsBtnOpac),"normal"==wppaOvlMode?jQuery("#wppa-fulls-btn").stop().fadeTo(3,wppaNormsBtnOpac):jQuery("#wppa-norms-btn").stop().fadeTo(3,wppaNormsBtnOpac)}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).resize(function(){jQuery("#wppa-overlay-bg").css({height:window.innerHeight,width:window.innerWidth}),wppaOvlResize()}),wppaConsoleLog("wppa-lightbox.js version "+wppaLightboxVersion+" loaded.","force");
|
js/wppa.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
//
|
3 |
// conatins common vars and functions
|
4 |
//
|
5 |
-
var wppaJsVersion = '6.9.
|
6 |
|
7 |
// Important notice:
|
8 |
// All external vars that may be given a value in wppa-non-admin.php must be declared here and not in other front-end js files!!
|
@@ -303,11 +303,9 @@ function wppaDoInit( autoOnly ) {
|
|
303 |
|
304 |
// Make sure ajax spinners dies
|
305 |
jQuery( '.wppa-ajax-spin' ).stop().fadeOut();
|
306 |
-
setTimeout( function() {jQuery( '.wppa-ajax-spin' ).stop().fadeOut();}, 1000 );
|
307 |
|
308 |
// Make sure ovl spinner dies
|
309 |
-
jQuery( '.wppa-ovl-spin' ).
|
310 |
-
setTimeout( function() {jQuery( '.wppa-ovl-spin' ).stop().fadeOut();}, 1000 );
|
311 |
|
312 |
// Fade ubbs out
|
313 |
setTimeout( function() {
|
2 |
//
|
3 |
// conatins common vars and functions
|
4 |
//
|
5 |
+
var wppaJsVersion = '6.9.10';
|
6 |
|
7 |
// Important notice:
|
8 |
// All external vars that may be given a value in wppa-non-admin.php must be declared here and not in other front-end js files!!
|
303 |
|
304 |
// Make sure ajax spinners dies
|
305 |
jQuery( '.wppa-ajax-spin' ).stop().fadeOut();
|
|
|
306 |
|
307 |
// Make sure ovl spinner dies
|
308 |
+
jQuery( '.wppa-ovl-spin' ).hide();
|
|
|
309 |
|
310 |
// Fade ubbs out
|
311 |
setTimeout( function() {
|
js/wppa.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var wppaJsVersion="6.9.08",wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth=[],wppaAutoColumnFrac=[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaMiniTreshold=300,wppaStart="Start",wppaStop="Stop",wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth=[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaProcessing="Processing...",wppaDone="Done!",wppaUploadFailed="Upload failed",wppaServerError="Server error",wppaGeoZoom=10,wppaLazyLoad=!0,wppaThumbAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,_wppaId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light";function wppaDoInit(p){var a=!1;for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc),a=!0);p||(_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),a&&jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc))})),jQuery(".wppa-ajax-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ajax-spin").stop().fadeOut()},1e3),jQuery(".wppa-ovl-spin").stop().fadeOut(),setTimeout(function(){jQuery(".wppa-ovl-spin").stop().fadeOut()},1e3),setTimeout(function(){for(var p=1;p<wppaTopMoc;)jQuery("#ubb-"+p+"-l")&&(wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")),p++},3e3),jQuery(window).on("DOMContentLoaded load resize scroll",wppaSizeThumbArea),wppaSizeThumbArea(),jQuery(window).on("DOMContentLoaded load resize scroll",wppaMakeLazyVisible),wppaMakeLazyVisible(),wppaProtect()}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var a,e,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,e=0;e<3;)1==++e&&0!=p||(a=document.getElementById(t[e]))&&"function"==typeof a.pause&&(a.pause(),wppaConsoleLog("Video "+t[e]+" paused","force"))}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var a=jQuery("audio");if(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;(a=(p=p.replace("/thumbs/","/")).split("//"))[1]?(e=a[1].split("/"),p=a[0]+"//"):(e=a[0].split("/"),p="");for(var t=0;t<e.length;){var o=e[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var a=document.getElementById("wppa-container-"+p),e=0;if(!wppaAutoColumnWidth[p])return a.clientWidth;for(;0==e;)a=a.parentNode,e=jQuery(a).width();return parseInt(e*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p){var a;if(wppaAutoColumnWidth[p]&&(a=wppaGetContainerWidth(p),wppaColWidth[p]!=a)){wppaConsoleLog("Doing autocol "+p),wppaColWidth[p]=a,jQuery(".wppa-container-"+p).css("width",a),wppaRenderModal&&(jQuery(".ui-dialog").css("width",a),jQuery(".ui-dialog").attr("height","auto")),wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-"+p).css("width",a-wppaTextFrameDelta),jQuery(".wppa-cover-box-"+p).css("width",a));var e,t=jQuery(".wppa-cover-box-mcr-"+p);if(1<t.length){var o=parseInt((a+8)/(wppaMaxCoverWidth+8))+1,r=o-1;e=parseInt((a+8)/o-8);for(var s=0;s<t.length;){switch(s%o){case 0:jQuery(t[s]).css({marginLeft:"0px",clear:"both",float:"left"});break;case r:jQuery(t[s]).css({marginLeft:"8px",clear:"none",float:"right"});break;default:jQuery(t[s]).css({marginLeft:"8px",clear:"none",float:"left"})}s++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",e-wppaTextFrameDelta),jQuery(".wppa-cover-box-mcr-"+p).css("width",e)}else if(wppaCoverImageResponsive[p]);else{jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",a-wppaTextFrameDelta);jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})}if(wppaThumbSpaceAuto){var i=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(i){var n=a-wppaThumbnailAreaDelta-7,l=parseInt(n/(i+wppaMinThumbSpace)),w=parseInt(.5+(n-l*i)/(l+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:w})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",a-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",a-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var u,c=1,d=jQuery("#wppa-mas-h-"+c+"-"+p).attr("data-height-perc");d;)u=d*(a-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+c+"-"+p).css("height",u),c++,d=jQuery("#wppa-mas-h-"+c+"-"+p).attr("data-height-perc");wppaSetMasHorFrameWidthsForIeAndChrome(p),wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",a-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*a),wppaFilmStripLength[p]=a-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",a),jQuery(".wppa-simg-"+p).css("width",a-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",a+10),jQuery(".wppa-mimg-"+p).css("width",a),jQuery(".wppa-mimg-"+p).css("height",""),0<wppaSearchBoxSelItems[p]&&(a/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*a)}}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var a=jQuery(".wppa-mas-h-"+p),e=wppaMinThumbSpace,t=0;t<a.length;t++){var o=wppaGetChildI(a[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+e;jQuery(a[t]).css({width:r})}}}function wppaGetChildI(p){var a,e=p.childNodes;for(a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(){wppaDoInit(!1),setTimeout(function(){wppaDoInit(!0)},1e3)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var a=1;a<=wppaMaxOccur;)wppaStartHtml[a]=jQuery("#wppa-container-"+a).html(),a++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,a){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(a),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,a)):(setTimeout("wppaFotomotoToolbar( "+p+',"'+a+'" )',200),wppaConsoleLog("Waiting for Fotomoto")))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function 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(""",'"').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=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="6.9.10",wppaVersion="0",wppaIsIe=!1,wppaUseSvg=!0,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth=[],wppaAutoColumnFrac=[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaMiniTreshold=300,wppaStart="Start",wppaStop="Stop",wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth=[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaProcessing="Processing...",wppaDone="Done!",wppaUploadFailed="Upload failed",wppaServerError="Server error",wppaGeoZoom=10,wppaLazyLoad=!0,wppaThumbAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,_wppaId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlTitles,wppaOvlAlts,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlModeInitial="normal",wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light";function wppaDoInit(p){var a=!1;for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc),a=!0);p||(_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),a&&jQuery(window).resize(function(){for(mocc=1;mocc<=wppaTopMoc;mocc++)wppaAutoColumnWidth[mocc]&&(wppaColWidth[mocc]=0,_wppaDoAutocol(mocc))})),jQuery(".wppa-ajax-spin").stop().fadeOut(),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 scroll",wppaSizeThumbArea),wppaSizeThumbArea(),jQuery(window).on("DOMContentLoaded load resize scroll",wppaMakeLazyVisible),wppaMakeLazyVisible(),wppaProtect()}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var a,e,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,e=0;e<3;)1==++e&&0!=p||(a=document.getElementById(t[e]))&&"function"==typeof a.pause&&(a.pause(),wppaConsoleLog("Video "+t[e]+" paused","force"))}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var a=jQuery("audio");if(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;(a=(p=p.replace("/thumbs/","/")).split("//"))[1]?(e=a[1].split("/"),p=a[0]+"//"):(e=a[0].split("/"),p="");for(var t=0;t<e.length;){var o=e[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var a=document.getElementById("wppa-container-"+p),e=0;if(!wppaAutoColumnWidth[p])return a.clientWidth;for(;0==e;)a=a.parentNode,e=jQuery(a).width();return parseInt(e*wppaAutoColumnFrac[p])}function _wppaDoAutocol(p){var a;if(wppaAutoColumnWidth[p]&&(a=wppaGetContainerWidth(p),wppaColWidth[p]!=a)){wppaConsoleLog("Doing autocol "+p),wppaColWidth[p]=a,jQuery(".wppa-container-"+p).css("width",a),wppaRenderModal&&(jQuery(".ui-dialog").css("width",a),jQuery(".ui-dialog").attr("height","auto")),wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-"+p).css("width",a-wppaTextFrameDelta),jQuery(".wppa-cover-box-"+p).css("width",a));var e,t=jQuery(".wppa-cover-box-mcr-"+p);if(1<t.length){var o=parseInt((a+8)/(wppaMaxCoverWidth+8))+1,r=o-1;e=parseInt((a+8)/o-8);for(var s=0;s<t.length;){switch(s%o){case 0:jQuery(t[s]).css({marginLeft:"0px",clear:"both",float:"left"});break;case r:jQuery(t[s]).css({marginLeft:"8px",clear:"none",float:"right"});break;default:jQuery(t[s]).css({marginLeft:"8px",clear:"none",float:"left"})}s++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",e-wppaTextFrameDelta),jQuery(".wppa-cover-box-mcr-"+p).css("width",e)}else if(wppaCoverImageResponsive[p]);else{jQuery(".wppa-asym-text-frame-mcr-"+p).css("width",a-wppaTextFrameDelta);jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})}if(wppaThumbSpaceAuto){var i=parseInt(jQuery(".thumbnail-frame-"+p).css("width"));if(i){var n=a-wppaThumbnailAreaDelta-7,l=parseInt(n/(i+wppaMinThumbSpace)),w=parseInt(.5+(n-l*i)/(l+1));jQuery(".thumbnail-frame-"+p).css({marginLeft:w})}}jQuery(".thumbnail-frame-comalt-"+p).css("width",a-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",a-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var u,c=1,d=jQuery("#wppa-mas-h-"+c+"-"+p).attr("data-height-perc");d;)u=d*(a-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+c+"-"+p).css("height",u),c++,d=jQuery("#wppa-mas-h-"+c+"-"+p).attr("data-height-perc");wppaSetMasHorFrameWidthsForIeAndChrome(p),wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",a-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*a),wppaFilmStripLength[p]=a-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",a),jQuery(".wppa-simg-"+p).css("width",a-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",a+10),jQuery(".wppa-mimg-"+p).css("width",a),jQuery(".wppa-mimg-"+p).css("height",""),0<wppaSearchBoxSelItems[p]&&(a/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*a)}}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var a=jQuery(".wppa-mas-h-"+p),e=wppaMinThumbSpace,t=0;t<a.length;t++){var o=wppaGetChildI(a[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);var r=o.naturalWidth/o.naturalHeight*o.height+e;jQuery(a[t]).css({width:r})}}}function wppaGetChildI(p){var a,e=p.childNodes;for(a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;var o=wppaGetChildI(t);if(o)return o}return!1}jQuery(document).ready(function(){wppaDoInit(!1),setTimeout(function(){wppaDoInit(!0)},1e3)}),jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var a=1;a<=wppaMaxOccur;)wppaStartHtml[a]=jQuery("#wppa-container-"+a).html(),a++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,a){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(a),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,a)):(setTimeout("wppaFotomotoToolbar( "+p+',"'+a+'" )',200),wppaConsoleLog("Waiting for Fotomoto")))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function 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(""",'"').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=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¤cy_code=USD&lc=US
|
4 |
Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
|
5 |
-
Version: 6.9.
|
6 |
-
Stable tag: 6.9.
|
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 |
= 6.9.09 =
|
141 |
|
142 |
* Panorama support phase III.
|
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¤cy_code=USD&lc=US
|
4 |
Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
|
5 |
+
Version: 6.9.10
|
6 |
+
Stable tag: 6.9.09
|
7 |
Author: J.N. Breetvelt
|
8 |
Author URI: http://www.opajaap.nl/
|
9 |
Requires at least: 3.9
|
137 |
|
138 |
== Upgrade Notice ==
|
139 |
|
140 |
+
= 6.9.10 =
|
141 |
+
|
142 |
+
* This version addresses various minor bug fixes and feature requests.
|
143 |
+
|
144 |
= 6.9.09 =
|
145 |
|
146 |
* Panorama support phase III.
|
wppa-picture.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Make the picture html
|
6 |
-
* Version 6.9.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -129,7 +129,7 @@ function wppa_get_picture_html( $args ) {
|
|
129 |
$title = wppa_zoom_in( $id );
|
130 |
}
|
131 |
|
132 |
-
// Create the html. To prevent mis-alignment of the audio control bar or to escape from the <a> tag for the
|
133 |
// we wrap it in a div with zero fontsize and lineheight.
|
134 |
$result = '<div style="font-size:0;line-height:0;" >';
|
135 |
|
@@ -276,7 +276,7 @@ function wppa_get_picture_html( $args ) {
|
|
276 |
return $result;
|
277 |
}
|
278 |
|
279 |
-
// Get full html for a lightbox
|
280 |
function wppa_get_lb_panorama_full_html( $id ) {
|
281 |
|
282 |
$result = wppa_get_lb_panorama_html( $id );
|
@@ -288,13 +288,13 @@ function wppa_get_lb_panorama_full_html( $id ) {
|
|
288 |
}
|
289 |
}
|
290 |
|
291 |
-
// Get the html for a lightbox
|
292 |
function wppa_get_lb_panorama_html( $id ) {
|
293 |
|
294 |
return wppa_get_panorama_html( array( 'id' => $id, 'lightbox' => true, ) );
|
295 |
}
|
296 |
|
297 |
-
// Get the html for a
|
298 |
function wppa_get_panorama_html( $args ) {
|
299 |
|
300 |
if ( ! isset( $args['id'] ) ) return;
|
@@ -302,10 +302,10 @@ function wppa_get_panorama_html( $args ) {
|
|
302 |
switch( wppa_is_panorama( $args['id'] ) ) {
|
303 |
|
304 |
case '1':
|
305 |
-
$result =
|
306 |
break;
|
307 |
case '2':
|
308 |
-
$result =
|
309 |
break;
|
310 |
default:
|
311 |
$result = '';
|
@@ -314,8 +314,8 @@ function wppa_get_panorama_html( $args ) {
|
|
314 |
return $result;
|
315 |
}
|
316 |
|
317 |
-
// Spheric 360deg
|
318 |
-
function
|
319 |
|
320 |
// Init
|
321 |
$defaults = array( 'id' => '0',
|
@@ -341,22 +341,22 @@ function wppa_get_spheric_panorama_html( $args ) {
|
|
341 |
$result =
|
342 |
( $lightbox ? $id . '.' : '' ) .
|
343 |
( $haslink ? '</a>' : '' ) .
|
344 |
-
( $lightbox ? '<div id="wppa-ovl-
|
345 |
'<div
|
346 |
-
id="wppa-
|
347 |
-
class="wppa-
|
348 |
style="margin-bottom:4px;cursor:grab;"
|
349 |
>
|
350 |
</div>
|
351 |
<div
|
352 |
-
id="wppa-
|
353 |
-
class="wppa-
|
354 |
style="text-align:center;"
|
355 |
>' .
|
356 |
( $lightbox ?
|
357 |
'<span
|
358 |
-
id="wppa-
|
359 |
-
class="wppa-
|
360 |
style="margin:0 2px 0 0;float:left;"
|
361 |
>' .
|
362 |
wppa_get_svghtml( 'Prev-Button', $iconsize, true ) .
|
@@ -365,45 +365,45 @@ function wppa_get_spheric_panorama_html( $args ) {
|
|
365 |
''
|
366 |
) .
|
367 |
'<span
|
368 |
-
id="wppa-
|
369 |
style="margin:0 2px;"
|
370 |
>' .
|
371 |
wppa_get_svghtml( 'Left-4', $iconsize, true ) .
|
372 |
'</span>
|
373 |
<span
|
374 |
-
id="wppa-
|
375 |
style="margin:0 2px;"
|
376 |
>' .
|
377 |
wppa_get_svghtml( 'Right-4', $iconsize, true ) .
|
378 |
'</span>
|
379 |
<span
|
380 |
-
id="wppa-
|
381 |
style="margin:0 2px;"
|
382 |
>' .
|
383 |
wppa_get_svghtml( 'Up-4', $iconsize, true ) .
|
384 |
'</span>
|
385 |
<span
|
386 |
-
id="wppa-
|
387 |
style="margin:0 2px;"
|
388 |
>' .
|
389 |
wppa_get_svghtml( 'Down-4', $iconsize, true ) .
|
390 |
'</span>
|
391 |
<span
|
392 |
-
id="wppa-
|
393 |
style="margin:0 2px;"
|
394 |
>' .
|
395 |
wppa_get_svghtml( 'ZoomIn', $iconsize, true ) .
|
396 |
'</span>
|
397 |
<span
|
398 |
-
id="wppa-
|
399 |
style="margin:0 2px;"
|
400 |
>' .
|
401 |
wppa_get_svghtml( 'ZoomOut', $iconsize, true ) .
|
402 |
'</span>' .
|
403 |
( $lightbox ?
|
404 |
'<span
|
405 |
-
id="wppa-
|
406 |
-
class="wppa-
|
407 |
style="margin:0 0 0 2px;float:right;"
|
408 |
>' .
|
409 |
wppa_get_svghtml( 'Next-Button', $iconsize, true ) .
|
@@ -415,11 +415,24 @@ function wppa_get_spheric_panorama_html( $args ) {
|
|
415 |
|
416 |
( $lightbox ? '</div>' : '' ) .
|
417 |
|
418 |
-
'<script>
|
|
|
|
|
|
|
|
|
419 |
|
420 |
-
|
|
|
|
|
|
|
|
|
421 |
|
422 |
-
|
|
|
|
|
|
|
|
|
|
|
423 |
manualControl = false,
|
424 |
longitude = 180,
|
425 |
latitude = 0,
|
@@ -431,25 +444,26 @@ function wppa_get_spheric_panorama_html( $args ) {
|
|
431 |
deltaY = 0,
|
432 |
deltaFov = 0,
|
433 |
fov = 75,
|
434 |
-
run =
|
435 |
busy = false,
|
|
|
436 |
aspect = ' . $width / $height . ',
|
437 |
-
div =
|
438 |
-
left =
|
439 |
-
right =
|
440 |
-
up =
|
441 |
-
down =
|
442 |
-
zoomin =
|
443 |
-
zoomout =
|
444 |
-
prev =
|
445 |
-
next =
|
446 |
|
447 |
// setting up the renderer
|
448 |
'renderer' . $mocc . ' = new THREE.WebGLRenderer();
|
449 |
renderer' . $mocc . '.setSize(' . $width . ', ' . $height . ');' .
|
450 |
|
451 |
// Place the element
|
452 |
-
'div.
|
453 |
|
454 |
// creating a new scene
|
455 |
'var scene = new THREE.Scene();' .
|
@@ -472,53 +486,67 @@ function wppa_get_spheric_panorama_html( $args ) {
|
|
472 |
|
473 |
// listeners
|
474 |
( wppa_is_mobile() ?
|
475 |
-
'right.
|
476 |
-
right.
|
477 |
-
left.
|
478 |
-
left.
|
479 |
-
up.
|
480 |
-
up.
|
481 |
-
down.
|
482 |
-
down.
|
483 |
-
zoomin.
|
484 |
-
zoomin.
|
485 |
-
zoomout.
|
486 |
-
zoomout.
|
487 |
:
|
488 |
-
'div.
|
489 |
-
div.
|
490 |
-
div.
|
491 |
-
div.
|
492 |
-
right.
|
493 |
-
right.
|
494 |
-
left.
|
495 |
-
left.
|
496 |
-
up.
|
497 |
-
up.
|
498 |
-
down.
|
499 |
-
down.
|
500 |
-
zoomin.
|
501 |
-
zoomin.
|
502 |
-
zoomout.
|
503 |
-
zoomout.
|
504 |
) .
|
505 |
'if (prev) {
|
506 |
-
prev.
|
507 |
-
next.
|
508 |
}' .
|
509 |
|
510 |
// Install Resize hanler
|
511 |
-
'
|
512 |
|
513 |
// Resize
|
514 |
'onResize' . $mocc . '();' .
|
515 |
|
|
|
|
|
|
|
516 |
// Doit!
|
517 |
'render();' .
|
518 |
|
519 |
// The rendering function
|
520 |
-
'function render(){
|
521 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
522 |
if(run==0)return;
|
523 |
if(busy)return;' .
|
524 |
|
@@ -526,8 +554,6 @@ function wppa_get_spheric_panorama_html( $args ) {
|
|
526 |
|
527 |
'busy = true;
|
528 |
|
529 |
-
jQuery("#wppa-ovl-spin").stop().fadeOut();
|
530 |
-
|
531 |
requestAnimationFrame(render);
|
532 |
|
533 |
if ( ! manualControl ) {
|
@@ -566,7 +592,10 @@ function wppa_get_spheric_panorama_html( $args ) {
|
|
566 |
var stop;
|
567 |
if ( ! stop ) {
|
568 |
stop = true;
|
569 |
-
|
|
|
|
|
|
|
570 |
wppaOvlShowPrev();
|
571 |
}
|
572 |
}' .
|
@@ -577,7 +606,10 @@ function wppa_get_spheric_panorama_html( $args ) {
|
|
577 |
var stop;
|
578 |
if ( ! stop ) {
|
579 |
stop = true;
|
580 |
-
|
|
|
|
|
|
|
581 |
wppaOvlShowNext();
|
582 |
}
|
583 |
}' .
|
@@ -602,6 +634,7 @@ function wppa_get_spheric_panorama_html( $args ) {
|
|
602 |
'function onDivMouseUp(e){
|
603 |
manualControl = false;
|
604 |
' . ( $lightbox ? '' : 'run=1;' ) . '
|
|
|
605 |
}' .
|
606 |
|
607 |
// Horizontal movement by buttons
|
@@ -655,15 +688,20 @@ function wppa_get_spheric_panorama_html( $args ) {
|
|
655 |
deltaY=0;
|
656 |
deltaFov=0;
|
657 |
if ( ! ' . $lightbox . ' ) run--;
|
|
|
658 |
}' .
|
659 |
|
660 |
// When a (responsive) resize is required, we resize the scene
|
661 |
'function onResize' . $mocc . '(e){' .
|
662 |
|
|
|
|
|
|
|
|
|
663 |
( $lightbox ?
|
664 |
|
665 |
// Show image container
|
666 |
-
'
|
667 |
|
668 |
// There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
|
669 |
'var widthIsLim,
|
@@ -716,27 +754,27 @@ function wppa_get_spheric_panorama_html( $args ) {
|
|
716 |
' .
|
717 |
|
718 |
// Set css common for all 4 situations
|
719 |
-
'
|
720 |
-
|
721 |
|
722 |
// Now set css for all 4 situations: Mode is normal
|
723 |
'if ( modeIsNormal ) {' .
|
724 |
|
725 |
// Common for mode normal
|
726 |
-
'
|
727 |
backgroundColor:"' . wppa_opt( 'ovl_theme' ) . '",
|
728 |
padding:"' . wppa_opt( 'ovl_border_width' ) . 'px",
|
729 |
borderRadius:"' . wppa_opt( 'ovl_border_radius' ) . 'px",
|
730 |
width:newWidth
|
731 |
});
|
732 |
-
|
733 |
|
734 |
// Limit specific
|
735 |
'if ( widthIsLim ) {
|
736 |
-
|
737 |
}
|
738 |
else {
|
739 |
-
|
740 |
}
|
741 |
}' .
|
742 |
|
@@ -744,8 +782,8 @@ function wppa_get_spheric_panorama_html( $args ) {
|
|
744 |
'else {' .
|
745 |
|
746 |
// Common for mode fullscreen
|
747 |
-
'
|
748 |
-
|
749 |
backgroundColor:"transparent",
|
750 |
padding:0,
|
751 |
borderRadius:0,
|
@@ -754,40 +792,39 @@ function wppa_get_spheric_panorama_html( $args ) {
|
|
754 |
});
|
755 |
|
756 |
if ( widthIsLim ) {
|
757 |
-
|
758 |
}
|
759 |
else {
|
760 |
-
|
761 |
}
|
762 |
}
|
763 |
|
764 |
renderer' . $mocc . '.setSize(newWidth, newHeight);
|
765 |
-
run=
|
766 |
render();
|
767 |
doZoom();
|
768 |
' :
|
769 |
'
|
770 |
-
var containerwidth = div.
|
771 |
var newWidth = containerwidth;
|
772 |
var newHeight = newWidth * ' . ( $height / $width ) . ';
|
773 |
renderer' . $mocc . '.setSize(newWidth, newHeight);
|
774 |
-
run=
|
775 |
render();
|
776 |
-
doZoom();
|
777 |
-
run=false;'
|
778 |
) . '
|
779 |
}' .
|
780 |
-
'}
|
781 |
|
782 |
</script>
|
783 |
' . ( $haslink ? '<a>' : '' ) . '';
|
784 |
|
785 |
//return $result;
|
786 |
-
return
|
787 |
}
|
788 |
|
789 |
-
// Non 360 flat
|
790 |
-
function
|
791 |
|
792 |
// Init
|
793 |
$defaults = array( 'id' => '0',
|
@@ -816,18 +853,18 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
816 |
( $haslink ? '</a>' : '' ) .
|
817 |
|
818 |
// The overall container
|
819 |
-
( $lightbox ? '<div id="wppa-ovl-
|
820 |
|
821 |
// The canvas container
|
822 |
'<div
|
823 |
-
id="wppa-
|
824 |
-
class="wppa-
|
825 |
style="margin-bottom:4px;"
|
826 |
>' .
|
827 |
|
828 |
// The actual drawing area
|
829 |
'<canvas
|
830 |
-
id="wppa-
|
831 |
style="background-color:black;cursor:grab;"
|
832 |
width="' . $width . '"
|
833 |
height="' . ( $width / 2 ) . '"
|
@@ -835,7 +872,7 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
835 |
|
836 |
// The preview image
|
837 |
'<canvas
|
838 |
-
id="wppa-
|
839 |
style="margin-top:4px;background-color:black;"
|
840 |
width="' . $width . '"
|
841 |
height=' . $height . '"
|
@@ -845,14 +882,14 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
845 |
|
846 |
// The controlbar
|
847 |
'<div
|
848 |
-
id="wppa-
|
849 |
-
class="wppa-
|
850 |
style="text-align:center;"
|
851 |
>' .
|
852 |
( $lightbox ?
|
853 |
'<span
|
854 |
-
id="wppa-
|
855 |
-
class="wppa-
|
856 |
style="margin:0 2px 0 0;float:left;"
|
857 |
>' .
|
858 |
wppa_get_svghtml( 'Prev-Button', $iconsize, true ) .
|
@@ -861,45 +898,45 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
861 |
''
|
862 |
) .
|
863 |
'<span
|
864 |
-
id="wppa-
|
865 |
style="margin:0 2px;"
|
866 |
>' .
|
867 |
wppa_get_svghtml( 'Left-4', $iconsize, true ) .
|
868 |
'</span>
|
869 |
<span
|
870 |
-
id="wppa-
|
871 |
style="margin:0 2px;"
|
872 |
>' .
|
873 |
wppa_get_svghtml( 'Right-4', $iconsize, true ) .
|
874 |
'</span>
|
875 |
<span
|
876 |
-
id="wppa-
|
877 |
style="margin:0 2px;"
|
878 |
>' .
|
879 |
wppa_get_svghtml( 'Up-4', $iconsize, true ) .
|
880 |
'</span>
|
881 |
<span
|
882 |
-
id="wppa-
|
883 |
style="margin:0 2px;"
|
884 |
>' .
|
885 |
wppa_get_svghtml( 'Down-4', $iconsize, true ) .
|
886 |
'</span>
|
887 |
<span
|
888 |
-
id="wppa-
|
889 |
style="margin:0 2px;"
|
890 |
>' .
|
891 |
wppa_get_svghtml( 'ZoomIn', $iconsize, true ) .
|
892 |
'</span>
|
893 |
<span
|
894 |
-
id="wppa-
|
895 |
style="margin:0 2px;"
|
896 |
>' .
|
897 |
wppa_get_svghtml( 'ZoomOut', $iconsize, true ) .
|
898 |
'</span>' .
|
899 |
( $lightbox ?
|
900 |
'<span
|
901 |
-
id="wppa-
|
902 |
-
class="wppa-
|
903 |
style="margin:0 0 0 2px;float:right;"
|
904 |
>' .
|
905 |
wppa_get_svghtml( 'Next-Button', $iconsize, true ) .
|
@@ -915,7 +952,7 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
915 |
|
916 |
// Create image object and add the image url to it
|
917 |
'var image' . $mocc . ' = new Image();
|
918 |
-
image' . $mocc . '.src = "' . $url . '"
|
919 |
|
920 |
// When document complete, run the main proc
|
921 |
'jQuery(document).ready(function(){wppaDoFlatPanorama' . $mocc . '();});' .
|
@@ -924,28 +961,30 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
924 |
'function wppaDoFlatPanorama' . $mocc . '(){' .
|
925 |
|
926 |
// Wait until the image file has been completely loaded
|
927 |
-
'if (!image' . $mocc . '.complete){setTimeout( wppaDoFlatPanorama' . $mocc . ',
|
928 |
|
929 |
// Var declarations
|
930 |
'var
|
|
|
931 |
manualControl = false,
|
932 |
deltaX = 0,
|
933 |
deltaY = 0,
|
934 |
deltaFactor = 1.0,
|
935 |
-
run =
|
936 |
busy = false,
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
|
|
949 |
canvasHeight = canvasWidth / 2,
|
950 |
savedCanvasX = 0,
|
951 |
savedCanvasY = 0,
|
@@ -958,46 +997,51 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
958 |
|
959 |
// Install listeners
|
960 |
( wppa_is_mobile() ?
|
961 |
-
'right.
|
962 |
-
right.
|
963 |
-
left.
|
964 |
-
left.
|
965 |
-
up.
|
966 |
-
up.
|
967 |
-
down.
|
968 |
-
down.
|
969 |
-
zoomin.
|
970 |
-
zoomin.
|
971 |
-
zoomout.
|
972 |
-
zoomout.
|
973 |
:
|
974 |
-
'canvas.addEventListener("mousedown", onCanvasMouseDown
|
975 |
-
canvas.addEventListener("mousemove", onCanvasMouseMove
|
976 |
-
canvas.addEventListener("mouseup", onCanvasMouseUp
|
977 |
-
|
978 |
-
prevCanvas.addEventListener("
|
979 |
-
prevCanvas.addEventListener("
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
|
|
|
|
992 |
) .
|
993 |
|
994 |
'if (prev) {
|
995 |
-
prev.
|
996 |
-
next.
|
997 |
}' .
|
998 |
|
999 |
// Install Resize handler
|
1000 |
-
'
|
|
|
|
|
|
|
1001 |
|
1002 |
// Do the rendering
|
1003 |
'render();' .
|
@@ -1006,16 +1050,22 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
1006 |
'onResize' . $mocc . '();' .
|
1007 |
|
1008 |
// The render function
|
1009 |
-
'function render(){
|
1010 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1011 |
if (run==0) return;
|
1012 |
if (busy) return;
|
1013 |
busy = true;' .
|
1014 |
|
1015 |
( $lightbox ? 'if ( wppaOvlActivePanorama != ' . $id . ' ) return;' : '' ) .
|
1016 |
|
1017 |
-
'jQuery("#wppa-ovl-spin").stop().fadeOut();' .
|
1018 |
-
|
1019 |
// manualControl is true when a drag on the canvas is being performed
|
1020 |
'if(!manualControl){' .
|
1021 |
|
@@ -1041,17 +1091,17 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
1041 |
'fromY = Math.max(0, Math.min(image' . $mocc . '.height-fromHeight, fromY));' .
|
1042 |
|
1043 |
// Draw the image
|
1044 |
-
'var
|
1045 |
-
'
|
1046 |
|
1047 |
// Draw the preview image
|
1048 |
-
'var
|
1049 |
-
'
|
1050 |
-
'
|
1051 |
|
1052 |
// Draw viewport rect on preview image
|
1053 |
'var factor = prevCanvas.width / image' . $mocc . '.width;' .
|
1054 |
-
'
|
1055 |
|
1056 |
// Done so far
|
1057 |
'busy = false;' .
|
@@ -1070,7 +1120,10 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
1070 |
var stop;
|
1071 |
if ( ! stop ) {
|
1072 |
stop = true;
|
1073 |
-
|
|
|
|
|
|
|
1074 |
wppaOvlShowPrev();
|
1075 |
}
|
1076 |
}' .
|
@@ -1081,7 +1134,10 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
1081 |
var stop;
|
1082 |
if ( ! stop ) {
|
1083 |
stop = true;
|
1084 |
-
|
|
|
|
|
|
|
1085 |
wppaOvlShowNext();
|
1086 |
}
|
1087 |
}' .
|
@@ -1125,15 +1181,20 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
1125 |
e.preventDefault();
|
1126 |
deltaX=0;deltaY=0;deltaFactor=1;
|
1127 |
if ( ! ' . $lightbox . ' ) run--;
|
|
|
1128 |
}' .
|
1129 |
|
1130 |
// When a (responsive) resize is required, we resize the scene
|
1131 |
'function onResize' . $mocc . '(e){' .
|
1132 |
|
|
|
|
|
|
|
|
|
1133 |
( $lightbox ?
|
1134 |
|
1135 |
// Show image container
|
1136 |
-
'
|
1137 |
|
1138 |
// There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
|
1139 |
'var widthIsLim,
|
@@ -1186,8 +1247,8 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
1186 |
'}' .
|
1187 |
|
1188 |
// Set css common for all 4 situations
|
1189 |
-
'
|
1190 |
-
|
1191 |
|
1192 |
canvas.width = newWidth;
|
1193 |
canvas.height = newHeight;
|
@@ -1198,20 +1259,20 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
1198 |
'if ( modeIsNormal ) {' .
|
1199 |
|
1200 |
// Common for mode normal
|
1201 |
-
'
|
1202 |
backgroundColor:"' . wppa_opt( 'ovl_theme' ) . '",
|
1203 |
padding:"' . wppa_opt( 'ovl_border_width' ) . 'px",
|
1204 |
borderRadius:"' . wppa_opt( 'ovl_border_radius' ) . 'px",
|
1205 |
width:newWidth
|
1206 |
});
|
1207 |
-
|
1208 |
|
1209 |
// Limit specific
|
1210 |
'if ( widthIsLim ) {
|
1211 |
-
|
1212 |
}
|
1213 |
else {
|
1214 |
-
|
1215 |
}
|
1216 |
|
1217 |
}' .
|
@@ -1220,38 +1281,38 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
1220 |
'else {' .
|
1221 |
|
1222 |
// Common for mode fullscreen
|
1223 |
-
'
|
1224 |
-
|
1225 |
backgroundColor:"transparent",
|
1226 |
padding:0,
|
1227 |
borderRadius:0,
|
1228 |
width:newWidth,
|
1229 |
marginLeft:(contWidth-newWidth)/2
|
1230 |
});
|
1231 |
-
|
1232 |
|
1233 |
/*
|
1234 |
|
1235 |
if ( widthIsLim ) {
|
1236 |
-
|
1237 |
}
|
1238 |
else {
|
1239 |
-
|
1240 |
|
1241 |
} */ '
|
1242 |
}' .
|
1243 |
|
1244 |
-
'run=
|
1245 |
render();
|
1246 |
|
1247 |
' :
|
1248 |
-
'canvasWidth = div.
|
1249 |
'canvasHeight = canvasWidth / 2;' .
|
1250 |
'canvas.width = canvasWidth;' .
|
1251 |
'canvas.height = canvasHeight;' .
|
1252 |
'prevCanvas.width = canvasWidth;' .
|
1253 |
'prevCanvas.height = canvasWidth * ' . $height . ' / ' . $width . ';' .
|
1254 |
-
'run=
|
1255 |
'render();'
|
1256 |
) .
|
1257 |
|
@@ -1299,10 +1360,10 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
1299 |
e.offsetY > factor * fromY &&
|
1300 |
e.offsetY < factor * ( fromY + fromHeight ) ) {
|
1301 |
|
1302 |
-
|
1303 |
}
|
1304 |
else {
|
1305 |
-
|
1306 |
}
|
1307 |
|
1308 |
if ( manualControl && !busy ){
|
@@ -1326,6 +1387,7 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
1326 |
|
1327 |
manualControl = false;
|
1328 |
' . ( $lightbox ? '' : 'run=1;' ) . '
|
|
|
1329 |
|
1330 |
}' .
|
1331 |
|
@@ -1334,11 +1396,11 @@ function wppa_get_flat_panorama_html( $args ) {
|
|
1334 |
</script>
|
1335 |
' . ( $haslink ? '<a>' : '' ) . '';
|
1336 |
|
1337 |
-
return
|
1338 |
}
|
1339 |
|
1340 |
// Minimize inine mixed html / js code
|
1341 |
-
function
|
1342 |
|
1343 |
$result = str_replace( "\t", '', $result );
|
1344 |
$result = str_replace( "\n", ' ', $result );
|
@@ -1353,6 +1415,6 @@ function wppa_panorama_min( $result ) {
|
|
1353 |
} while ( $nlen != $olen );
|
1354 |
$result = str_replace( array( ', ', '; ', '( ', ' )', '{ ', ' }', '( "', '" )' ), array( ',', ';', '(', ')', '{', '}', '("', '")' ), $result );
|
1355 |
$result = str_replace( '> <', '><', $result );
|
1356 |
-
|
1357 |
return $result;
|
1358 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Make the picture html
|
6 |
+
* Version 6.9.10
|
7 |
*
|
8 |
*/
|
9 |
|
129 |
$title = wppa_zoom_in( $id );
|
130 |
}
|
131 |
|
132 |
+
// Create the html. To prevent mis-alignment of the audio control bar or to escape from the <a> tag for the pan controlbar
|
133 |
// we wrap it in a div with zero fontsize and lineheight.
|
134 |
$result = '<div style="font-size:0;line-height:0;" >';
|
135 |
|
276 |
return $result;
|
277 |
}
|
278 |
|
279 |
+
// Get full html for a lightbox pan image, e.g. ' data-panorama="'..."' for use in lightbox anchor link
|
280 |
function wppa_get_lb_panorama_full_html( $id ) {
|
281 |
|
282 |
$result = wppa_get_lb_panorama_html( $id );
|
288 |
}
|
289 |
}
|
290 |
|
291 |
+
// Get the html for a lightbox pan image
|
292 |
function wppa_get_lb_panorama_html( $id ) {
|
293 |
|
294 |
return wppa_get_panorama_html( array( 'id' => $id, 'lightbox' => true, ) );
|
295 |
}
|
296 |
|
297 |
+
// Get the html for a pan image
|
298 |
function wppa_get_panorama_html( $args ) {
|
299 |
|
300 |
if ( ! isset( $args['id'] ) ) return;
|
302 |
switch( wppa_is_panorama( $args['id'] ) ) {
|
303 |
|
304 |
case '1':
|
305 |
+
$result = wppa_get_spheric_pan_html( $args );
|
306 |
break;
|
307 |
case '2':
|
308 |
+
$result = wppa_get_flat_pan_html( $args );
|
309 |
break;
|
310 |
default:
|
311 |
$result = '';
|
314 |
return $result;
|
315 |
}
|
316 |
|
317 |
+
// Spheric 360deg pan
|
318 |
+
function wppa_get_spheric_pan_html( $args ) {
|
319 |
|
320 |
// Init
|
321 |
$defaults = array( 'id' => '0',
|
341 |
$result =
|
342 |
( $lightbox ? $id . '.' : '' ) .
|
343 |
( $haslink ? '</a>' : '' ) .
|
344 |
+
( $lightbox ? '<div id="wppa-ovl-pan-container" >' : '' ) .
|
345 |
'<div
|
346 |
+
id="wppa-pan-div-' . $mocc . '"
|
347 |
+
class="wppa-pan-div wppa-pan-div-' . $mocc . '"
|
348 |
style="margin-bottom:4px;cursor:grab;"
|
349 |
>
|
350 |
</div>
|
351 |
<div
|
352 |
+
id="wppa-pctl-div-' . $mocc . '"
|
353 |
+
class="wppa-pctl-div wppa-pctl-div-' . $mocc . '"
|
354 |
style="text-align:center;"
|
355 |
>' .
|
356 |
( $lightbox ?
|
357 |
'<span
|
358 |
+
id="wppa-pctl-prev-' . $mocc . '"
|
359 |
+
class="wppa-pan-prevnext"
|
360 |
style="margin:0 2px 0 0;float:left;"
|
361 |
>' .
|
362 |
wppa_get_svghtml( 'Prev-Button', $iconsize, true ) .
|
365 |
''
|
366 |
) .
|
367 |
'<span
|
368 |
+
id="wppa-pctl-left-' . $mocc . '"
|
369 |
style="margin:0 2px;"
|
370 |
>' .
|
371 |
wppa_get_svghtml( 'Left-4', $iconsize, true ) .
|
372 |
'</span>
|
373 |
<span
|
374 |
+
id="wppa-pctl-right-' . $mocc . '"
|
375 |
style="margin:0 2px;"
|
376 |
>' .
|
377 |
wppa_get_svghtml( 'Right-4', $iconsize, true ) .
|
378 |
'</span>
|
379 |
<span
|
380 |
+
id="wppa-pctl-up-' . $mocc . '"
|
381 |
style="margin:0 2px;"
|
382 |
>' .
|
383 |
wppa_get_svghtml( 'Up-4', $iconsize, true ) .
|
384 |
'</span>
|
385 |
<span
|
386 |
+
id="wppa-pctl-down-' . $mocc . '"
|
387 |
style="margin:0 2px;"
|
388 |
>' .
|
389 |
wppa_get_svghtml( 'Down-4', $iconsize, true ) .
|
390 |
'</span>
|
391 |
<span
|
392 |
+
id="wppa-pctl-zoomin-' . $mocc . '"
|
393 |
style="margin:0 2px;"
|
394 |
>' .
|
395 |
wppa_get_svghtml( 'ZoomIn', $iconsize, true ) .
|
396 |
'</span>
|
397 |
<span
|
398 |
+
id="wppa-pctl-zoomout-' . $mocc . '"
|
399 |
style="margin:0 2px;"
|
400 |
>' .
|
401 |
wppa_get_svghtml( 'ZoomOut', $iconsize, true ) .
|
402 |
'</span>' .
|
403 |
( $lightbox ?
|
404 |
'<span
|
405 |
+
id="wppa-pctl-next-' . $mocc . '"
|
406 |
+
class="wppa-pan-prevnext"
|
407 |
style="margin:0 0 0 2px;float:right;"
|
408 |
>' .
|
409 |
wppa_get_svghtml( 'Next-Button', $iconsize, true ) .
|
415 |
|
416 |
( $lightbox ? '</div>' : '' ) .
|
417 |
|
418 |
+
'<script>' .
|
419 |
+
|
420 |
+
// Create image object and add the image url to it
|
421 |
+
'var image' . $mocc . ' = new Image();
|
422 |
+
image' . $mocc . '.src = "' . $url . '";' .
|
423 |
|
424 |
+
// When document complete, run the main proc
|
425 |
+
'jQuery(document).ready(function(){wppaDoSphericPanorama' . $mocc . '();});' .
|
426 |
+
|
427 |
+
// The main proccedure
|
428 |
+
'function wppaDoSphericPanorama' . $mocc . '(){' .
|
429 |
|
430 |
+
// Wait until the image file has been completely loaded
|
431 |
+
'if (!image' . $mocc . '.complete){setTimeout( wppaDoSphericPanorama' . $mocc . ', 100 );return;};' .
|
432 |
+
|
433 |
+
// Var declarations
|
434 |
+
'var
|
435 |
+
$ = jQuery,
|
436 |
manualControl = false,
|
437 |
longitude = 180,
|
438 |
latitude = 0,
|
444 |
deltaY = 0,
|
445 |
deltaFov = 0,
|
446 |
fov = 75,
|
447 |
+
run = 4,
|
448 |
busy = false,
|
449 |
+
abort = false,
|
450 |
aspect = ' . $width / $height . ',
|
451 |
+
div = $( "#wppa-pan-div-' . $mocc . '" ),
|
452 |
+
left = $("#wppa-pctl-left-' . $mocc . '" ),
|
453 |
+
right = $("#wppa-pctl-right-' . $mocc . '" ),
|
454 |
+
up = $("#wppa-pctl-up-' . $mocc . '" ),
|
455 |
+
down = $("#wppa-pctl-down-' . $mocc . '" ),
|
456 |
+
zoomin = $("#wppa-pctl-zoomin-' . $mocc . '" ),
|
457 |
+
zoomout = $("#wppa-pctl-zoomout-' . $mocc . '" ),
|
458 |
+
prev = $("#wppa-pctl-prev-' . $mocc . '" ),
|
459 |
+
next = $("#wppa-pctl-next-' . $mocc . '" );' .
|
460 |
|
461 |
// setting up the renderer
|
462 |
'renderer' . $mocc . ' = new THREE.WebGLRenderer();
|
463 |
renderer' . $mocc . '.setSize(' . $width . ', ' . $height . ');' .
|
464 |
|
465 |
// Place the element
|
466 |
+
'$(div).append(renderer' . $mocc . '.domElement);' .
|
467 |
|
468 |
// creating a new scene
|
469 |
'var scene = new THREE.Scene();' .
|
486 |
|
487 |
// listeners
|
488 |
( wppa_is_mobile() ?
|
489 |
+
'$(right).on("touchstart", onRightMouseDown);
|
490 |
+
$(right).on("touchend", onButtonUp);
|
491 |
+
$(left).on("touchstart", onLeftMouseDown);
|
492 |
+
$(left).on("touchend", onButtonUp);
|
493 |
+
$(up).on("touchstart", onUpMouseDown);
|
494 |
+
$(up).on("touchend", onButtonUp);
|
495 |
+
$(down).on("touchstart", onDownMouseDown);
|
496 |
+
$(down).on("touchend", onButtonUp);
|
497 |
+
$(zoomin).on("touchstart", onZoomInMouseDown);
|
498 |
+
$(zoomin).on("touchend", onButtonUp);
|
499 |
+
$(zoomout).on("touchstart", onZoomOutMouseDown);
|
500 |
+
$(zoomout).on("touchend", onButtonUp);'
|
501 |
:
|
502 |
+
'$(div).on("mousedown", onDivMouseDown);
|
503 |
+
$(div).on("mousemove", onDivMouseMove);
|
504 |
+
$(div).on("mouseup", onDivMouseUp);
|
505 |
+
$(div).on("mouseout", onDivMouseUp);
|
506 |
+
$(right).on("mousedown", onRightMouseDown);
|
507 |
+
$(right).on("mouseup", onButtonUp);
|
508 |
+
$(left).on("mousedown", onLeftMouseDown);
|
509 |
+
$(left).on("mouseup", onButtonUp);
|
510 |
+
$(up).on("mousedown", onUpMouseDown);
|
511 |
+
$(up).on("mouseup", onButtonUp);
|
512 |
+
$(down).on("mousedown", onDownMouseDown);
|
513 |
+
$(down).on("mouseup", onButtonUp);
|
514 |
+
$(zoomin).on("mousedown", onZoomInMouseDown);
|
515 |
+
$(zoomin).on("mouseup", onButtonUp);
|
516 |
+
$(zoomout).on("mousedown", onZoomOutMouseDown);
|
517 |
+
$(zoomout).on("mouseup", onButtonUp);'
|
518 |
) .
|
519 |
'if (prev) {
|
520 |
+
prev.on("click", panPrev);
|
521 |
+
next.on("click", panNext);
|
522 |
}' .
|
523 |
|
524 |
// Install Resize hanler
|
525 |
+
'$(window).on("DOMContentLoaded load resize orientationchange kickpanorama",onResize' . $mocc . ');' .
|
526 |
|
527 |
// Resize
|
528 |
'onResize' . $mocc . '();' .
|
529 |
|
530 |
+
// Remove spinner
|
531 |
+
'$("#wppa-ovl-spin").hide();' .
|
532 |
+
|
533 |
// Doit!
|
534 |
'render();' .
|
535 |
|
536 |
// The rendering function
|
537 |
+
'function render(){' .
|
538 |
+
|
539 |
+
// 'wppaConsoleLog("Spheric, run="+run+", busy="+busy+", abort="+abort);' .
|
540 |
+
|
541 |
+
( $lightbox ? 'if (!wppaOvlOpen) abort=true;' :'' ) .
|
542 |
+
'if(abort){
|
543 |
+
scene = null;
|
544 |
+
camera = null;
|
545 |
+
sphere = null;
|
546 |
+
sphereMaterial = null;
|
547 |
+
sphereMesh = null;
|
548 |
+
return;
|
549 |
+
}
|
550 |
if(run==0)return;
|
551 |
if(busy)return;' .
|
552 |
|
554 |
|
555 |
'busy = true;
|
556 |
|
|
|
|
|
557 |
requestAnimationFrame(render);
|
558 |
|
559 |
if ( ! manualControl ) {
|
592 |
var stop;
|
593 |
if ( ! stop ) {
|
594 |
stop = true;
|
595 |
+
$(this).css({opacity:0.5});
|
596 |
+
$("#wppa-overlay-ic").css({display:"none"});
|
597 |
+
$("#wppa-ovl-spin").show();
|
598 |
+
abort = true;
|
599 |
wppaOvlShowPrev();
|
600 |
}
|
601 |
}' .
|
606 |
var stop;
|
607 |
if ( ! stop ) {
|
608 |
stop = true;
|
609 |
+
$(this).css({opacity:0.5});
|
610 |
+
$("#wppa-overlay-ic").css({display:"none"});
|
611 |
+
$("#wppa-ovl-spin").show();
|
612 |
+
abort = true;
|
613 |
wppaOvlShowNext();
|
614 |
}
|
615 |
}' .
|
634 |
'function onDivMouseUp(e){
|
635 |
manualControl = false;
|
636 |
' . ( $lightbox ? '' : 'run=1;' ) . '
|
637 |
+
run=4;
|
638 |
}' .
|
639 |
|
640 |
// Horizontal movement by buttons
|
688 |
deltaY=0;
|
689 |
deltaFov=0;
|
690 |
if ( ! ' . $lightbox . ' ) run--;
|
691 |
+
run=4;
|
692 |
}' .
|
693 |
|
694 |
// When a (responsive) resize is required, we resize the scene
|
695 |
'function onResize' . $mocc . '(e){' .
|
696 |
|
697 |
+
// 'wppaConsoleLog("Resize spheric");' .
|
698 |
+
|
699 |
+
'if (abort) return;' .
|
700 |
+
|
701 |
( $lightbox ?
|
702 |
|
703 |
// Show image container
|
704 |
+
'$("#wppa-overlay-ic").css("display", "");' .
|
705 |
|
706 |
// There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
|
707 |
'var widthIsLim,
|
754 |
' .
|
755 |
|
756 |
// Set css common for all 4 situations
|
757 |
+
'$("#wppa-ovl-pan-container").css({marginTop:topMarg});
|
758 |
+
$("#wppa-overlay-ic").css({marginTop:0});' .
|
759 |
|
760 |
// Now set css for all 4 situations: Mode is normal
|
761 |
'if ( modeIsNormal ) {' .
|
762 |
|
763 |
// Common for mode normal
|
764 |
+
'$("#wppa-ovl-pan-container").css({
|
765 |
backgroundColor:"' . wppa_opt( 'ovl_theme' ) . '",
|
766 |
padding:"' . wppa_opt( 'ovl_border_width' ) . 'px",
|
767 |
borderRadius:"' . wppa_opt( 'ovl_border_radius' ) . 'px",
|
768 |
width:newWidth
|
769 |
});
|
770 |
+
$( "#wppa-pctl-div-' . $mocc . '" ).css({marginLeft:0});' .
|
771 |
|
772 |
// Limit specific
|
773 |
'if ( widthIsLim ) {
|
774 |
+
$("#wppa-overlay-ic").css({marginLeft:4});
|
775 |
}
|
776 |
else {
|
777 |
+
$("#wppa-overlay-ic").css({marginLeft:(contWidth-newWidth)/2});
|
778 |
}
|
779 |
}' .
|
780 |
|
782 |
'else {' .
|
783 |
|
784 |
// Common for mode fullscreen
|
785 |
+
'$("#wppa-overlay-ic").css({marginLeft:0});
|
786 |
+
$("#wppa-ovl-pan-container").css({
|
787 |
backgroundColor:"transparent",
|
788 |
padding:0,
|
789 |
borderRadius:0,
|
792 |
});
|
793 |
|
794 |
if ( widthIsLim ) {
|
795 |
+
$("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});
|
796 |
}
|
797 |
else {
|
798 |
+
$("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});
|
799 |
}
|
800 |
}
|
801 |
|
802 |
renderer' . $mocc . '.setSize(newWidth, newHeight);
|
803 |
+
run=4;
|
804 |
render();
|
805 |
doZoom();
|
806 |
' :
|
807 |
'
|
808 |
+
var containerwidth = $(div).parent().width();
|
809 |
var newWidth = containerwidth;
|
810 |
var newHeight = newWidth * ' . ( $height / $width ) . ';
|
811 |
renderer' . $mocc . '.setSize(newWidth, newHeight);
|
812 |
+
run=4;
|
813 |
render();
|
814 |
+
doZoom();'
|
|
|
815 |
) . '
|
816 |
}' .
|
817 |
+
'};
|
818 |
|
819 |
</script>
|
820 |
' . ( $haslink ? '<a>' : '' ) . '';
|
821 |
|
822 |
//return $result;
|
823 |
+
return wppa_pan_min( $result );
|
824 |
}
|
825 |
|
826 |
+
// Non 360 flat pan
|
827 |
+
function wppa_get_flat_pan_html( $args ) {
|
828 |
|
829 |
// Init
|
830 |
$defaults = array( 'id' => '0',
|
853 |
( $haslink ? '</a>' : '' ) .
|
854 |
|
855 |
// The overall container
|
856 |
+
( $lightbox ? '<div id="wppa-ovl-pan-container" >' : '' ) .
|
857 |
|
858 |
// The canvas container
|
859 |
'<div
|
860 |
+
id="wppa-pan-div-' . $mocc . '"
|
861 |
+
class="wppa-pan-div wppa-pan-div-' . $mocc . '"
|
862 |
style="margin-bottom:4px;"
|
863 |
>' .
|
864 |
|
865 |
// The actual drawing area
|
866 |
'<canvas
|
867 |
+
id="wppa-pan-canvas-' . $mocc . '"
|
868 |
style="background-color:black;cursor:grab;"
|
869 |
width="' . $width . '"
|
870 |
height="' . ( $width / 2 ) . '"
|
872 |
|
873 |
// The preview image
|
874 |
'<canvas
|
875 |
+
id="wppa-pan-prev-canvas-' . $mocc . '"
|
876 |
style="margin-top:4px;background-color:black;"
|
877 |
width="' . $width . '"
|
878 |
height=' . $height . '"
|
882 |
|
883 |
// The controlbar
|
884 |
'<div
|
885 |
+
id="wppa-pctl-div-' . $mocc . '"
|
886 |
+
class="wppa-pctl-div wppa-pctl-div-' . $mocc . '"
|
887 |
style="text-align:center;"
|
888 |
>' .
|
889 |
( $lightbox ?
|
890 |
'<span
|
891 |
+
id="wppa-pctl-prev-' . $mocc . '"
|
892 |
+
class="wppa-pan-prevnext"
|
893 |
style="margin:0 2px 0 0;float:left;"
|
894 |
>' .
|
895 |
wppa_get_svghtml( 'Prev-Button', $iconsize, true ) .
|
898 |
''
|
899 |
) .
|
900 |
'<span
|
901 |
+
id="wppa-pctl-left-' . $mocc . '"
|
902 |
style="margin:0 2px;"
|
903 |
>' .
|
904 |
wppa_get_svghtml( 'Left-4', $iconsize, true ) .
|
905 |
'</span>
|
906 |
<span
|
907 |
+
id="wppa-pctl-right-' . $mocc . '"
|
908 |
style="margin:0 2px;"
|
909 |
>' .
|
910 |
wppa_get_svghtml( 'Right-4', $iconsize, true ) .
|
911 |
'</span>
|
912 |
<span
|
913 |
+
id="wppa-pctl-up-' . $mocc . '"
|
914 |
style="margin:0 2px;"
|
915 |
>' .
|
916 |
wppa_get_svghtml( 'Up-4', $iconsize, true ) .
|
917 |
'</span>
|
918 |
<span
|
919 |
+
id="wppa-pctl-down-' . $mocc . '"
|
920 |
style="margin:0 2px;"
|
921 |
>' .
|
922 |
wppa_get_svghtml( 'Down-4', $iconsize, true ) .
|
923 |
'</span>
|
924 |
<span
|
925 |
+
id="wppa-pctl-zoomin-' . $mocc . '"
|
926 |
style="margin:0 2px;"
|
927 |
>' .
|
928 |
wppa_get_svghtml( 'ZoomIn', $iconsize, true ) .
|
929 |
'</span>
|
930 |
<span
|
931 |
+
id="wppa-pctl-zoomout-' . $mocc . '"
|
932 |
style="margin:0 2px;"
|
933 |
>' .
|
934 |
wppa_get_svghtml( 'ZoomOut', $iconsize, true ) .
|
935 |
'</span>' .
|
936 |
( $lightbox ?
|
937 |
'<span
|
938 |
+
id="wppa-pctl-next-' . $mocc . '"
|
939 |
+
class="wppa-pan-prevnext"
|
940 |
style="margin:0 0 0 2px;float:right;"
|
941 |
>' .
|
942 |
wppa_get_svghtml( 'Next-Button', $iconsize, true ) .
|
952 |
|
953 |
// Create image object and add the image url to it
|
954 |
'var image' . $mocc . ' = new Image();
|
955 |
+
image' . $mocc . '.src = "' . $url . '";' .
|
956 |
|
957 |
// When document complete, run the main proc
|
958 |
'jQuery(document).ready(function(){wppaDoFlatPanorama' . $mocc . '();});' .
|
961 |
'function wppaDoFlatPanorama' . $mocc . '(){' .
|
962 |
|
963 |
// Wait until the image file has been completely loaded
|
964 |
+
'if (!image' . $mocc . '.complete){setTimeout( wppaDoFlatPanorama' . $mocc . ', 100 );return;}' .
|
965 |
|
966 |
// Var declarations
|
967 |
'var
|
968 |
+
$ = jQuery,
|
969 |
manualControl = false,
|
970 |
deltaX = 0,
|
971 |
deltaY = 0,
|
972 |
deltaFactor = 1.0,
|
973 |
+
run = 4,
|
974 |
busy = false,
|
975 |
+
abort = false,
|
976 |
+
div = $("#wppa-pan-div-' . $mocc . '"),
|
977 |
+
canvas = document.getElementById("wppa-pan-canvas-' . $mocc . '"),
|
978 |
+
prevCanvas = document.getElementById("wppa-pan-prev-canvas-' . $mocc . '"),
|
979 |
+
left = $("#wppa-pctl-left-' . $mocc . '"),
|
980 |
+
right = $("#wppa-pctl-right-' . $mocc . '"),
|
981 |
+
up = $("#wppa-pctl-up-' . $mocc . '"),
|
982 |
+
down = $("#wppa-pctl-down-' . $mocc . '"),
|
983 |
+
zoomin = $("#wppa-pctl-zoomin-' . $mocc . '"),
|
984 |
+
zoomout = $("#wppa-pctl-zoomout-' . $mocc . '"),
|
985 |
+
prev = $("#wppa-pctl-prev-' . $mocc . '"),
|
986 |
+
next = $("#wppa-pctl-next-' . $mocc . '"),
|
987 |
+
canvasWidth = $(div).parent().width(),
|
988 |
canvasHeight = canvasWidth / 2,
|
989 |
savedCanvasX = 0,
|
990 |
savedCanvasY = 0,
|
997 |
|
998 |
// Install listeners
|
999 |
( wppa_is_mobile() ?
|
1000 |
+
'right.on("touchstart", onRightMouseDown);
|
1001 |
+
right.on("touchend", onButtonUp);
|
1002 |
+
left.on("touchstart", onLeftMouseDown);
|
1003 |
+
left.on("touchend", onButtonUp);
|
1004 |
+
up.on("touchstart", onUpMouseDown);
|
1005 |
+
up.on("touchend", onButtonUp);
|
1006 |
+
down.on("touchstart", onDownMouseDown);
|
1007 |
+
down.on("touchend", onButtonUp);
|
1008 |
+
zoomin.on("touchstart", onZoomInMouseDown);
|
1009 |
+
zoomin.on("touchend", onButtonUp);
|
1010 |
+
zoomout.on("touchstart", onZoomOutMouseDown);
|
1011 |
+
zoomout.on("touchend", onButtonUp);'
|
1012 |
:
|
1013 |
+
'canvas.addEventListener("mousedown", onCanvasMouseDown);
|
1014 |
+
canvas.addEventListener("mousemove", onCanvasMouseMove);
|
1015 |
+
canvas.addEventListener("mouseup", onCanvasMouseUp);
|
1016 |
+
canvas.addEventListener("mouseout", onCanvasMouseUp);
|
1017 |
+
prevCanvas.addEventListener("mousedown", onCanvasMouseDown);
|
1018 |
+
prevCanvas.addEventListener("mousemove", onPrevCanvasMouseMove);
|
1019 |
+
prevCanvas.addEventListener("mouseup", onCanvasMouseUp);
|
1020 |
+
prevCanvas.addEventListener("mouseout", onCanvasMouseUp);
|
1021 |
+
right.on("mousedown", onRightMouseDown);
|
1022 |
+
right.on("mouseup", onButtonUp);
|
1023 |
+
left.on("mousedown", onLeftMouseDown);
|
1024 |
+
left.on("mouseup", onButtonUp);
|
1025 |
+
up.on("mousedown", onUpMouseDown);
|
1026 |
+
up.on("mouseup", onButtonUp);
|
1027 |
+
down.on("mousedown", onDownMouseDown);
|
1028 |
+
down.on("mouseup", onButtonUp);
|
1029 |
+
zoomin.on("mousedown", onZoomInMouseDown);
|
1030 |
+
zoomin.on("mouseup", onButtonUp);
|
1031 |
+
zoomout.on("mousedown", onZoomOutMouseDown);
|
1032 |
+
zoomout.on("mouseup", onButtonUp);'
|
1033 |
) .
|
1034 |
|
1035 |
'if (prev) {
|
1036 |
+
prev.on("click", panPrev);
|
1037 |
+
next.on("click", panNext);
|
1038 |
}' .
|
1039 |
|
1040 |
// Install Resize handler
|
1041 |
+
'$(window).on("DOMContentLoaded load resize kickpanorama orientationchange",onResize' . $mocc . ');' .
|
1042 |
+
|
1043 |
+
// Remove spinner
|
1044 |
+
'$("#wppa-ovl-spin").hide();' .
|
1045 |
|
1046 |
// Do the rendering
|
1047 |
'render();' .
|
1050 |
'onResize' . $mocc . '();' .
|
1051 |
|
1052 |
// The render function
|
1053 |
+
'function render(){' .
|
1054 |
|
1055 |
+
// 'wppaConsoleLog("Flat, run="+run+", busy="+busy+", abort="+abort);' .
|
1056 |
+
|
1057 |
+
( $lightbox ? 'if (!wppaOvlOpen) abort=true;' :'' ) .
|
1058 |
+
'if (abort) {
|
1059 |
+
ctx = null;
|
1060 |
+
prevctx = null;
|
1061 |
+
return;
|
1062 |
+
}
|
1063 |
if (run==0) return;
|
1064 |
if (busy) return;
|
1065 |
busy = true;' .
|
1066 |
|
1067 |
( $lightbox ? 'if ( wppaOvlActivePanorama != ' . $id . ' ) return;' : '' ) .
|
1068 |
|
|
|
|
|
1069 |
// manualControl is true when a drag on the canvas is being performed
|
1070 |
'if(!manualControl){' .
|
1071 |
|
1091 |
'fromY = Math.max(0, Math.min(image' . $mocc . '.height-fromHeight, fromY));' .
|
1092 |
|
1093 |
// Draw the image
|
1094 |
+
'var ctx = canvas.getContext("2d");' .
|
1095 |
+
'ctx.drawImage(image' . $mocc . ',fromX,fromY,fromWidth,fromHeight,0,0,canvas.width,canvas.height);' .
|
1096 |
|
1097 |
// Draw the preview image
|
1098 |
+
'var prevctx = prevCanvas.getContext("2d");' .
|
1099 |
+
'prevctx.clearRect(0, 0, prevCanvas.width, prevCanvas.height);' .
|
1100 |
+
'prevctx.drawImage(image' . $mocc . ',0,0,image' . $mocc . '.width,image' . $mocc . '.height,0,0,prevCanvas.width,prevCanvas.height);' .
|
1101 |
|
1102 |
// Draw viewport rect on preview image
|
1103 |
'var factor = prevCanvas.width / image' . $mocc . '.width;' .
|
1104 |
+
'prevctx.strokeRect(factor*fromX,factor*fromY,factor*fromWidth,factor*fromHeight);' .
|
1105 |
|
1106 |
// Done so far
|
1107 |
'busy = false;' .
|
1120 |
var stop;
|
1121 |
if ( ! stop ) {
|
1122 |
stop = true;
|
1123 |
+
$(this).css({opacity:0.5});
|
1124 |
+
$("#wppa-overlay-ic").css({display:"none"});
|
1125 |
+
$("#wppa-ovl-spin").show();
|
1126 |
+
abort = true;
|
1127 |
wppaOvlShowPrev();
|
1128 |
}
|
1129 |
}' .
|
1134 |
var stop;
|
1135 |
if ( ! stop ) {
|
1136 |
stop = true;
|
1137 |
+
$(this).css({opacity:0.5});
|
1138 |
+
$("#wppa-overlay-ic").css({display:"none"});
|
1139 |
+
$("#wppa-ovl-spin").show();
|
1140 |
+
abort = true;
|
1141 |
wppaOvlShowNext();
|
1142 |
}
|
1143 |
}' .
|
1181 |
e.preventDefault();
|
1182 |
deltaX=0;deltaY=0;deltaFactor=1;
|
1183 |
if ( ! ' . $lightbox . ' ) run--;
|
1184 |
+
run=4;
|
1185 |
}' .
|
1186 |
|
1187 |
// When a (responsive) resize is required, we resize the scene
|
1188 |
'function onResize' . $mocc . '(e){' .
|
1189 |
|
1190 |
+
'if (abort) return;' .
|
1191 |
+
|
1192 |
+
// 'wppaConsoleLog("Resize flat");' .
|
1193 |
+
|
1194 |
( $lightbox ?
|
1195 |
|
1196 |
// Show image container
|
1197 |
+
'$("#wppa-overlay-ic").css("display", "");' .
|
1198 |
|
1199 |
// There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
|
1200 |
'var widthIsLim,
|
1247 |
'}' .
|
1248 |
|
1249 |
// Set css common for all 4 situations
|
1250 |
+
'$("#wppa-ovl-pan-container").css({marginTop:topMarg});
|
1251 |
+
$("#wppa-overlay-ic").css({marginTop:0});
|
1252 |
|
1253 |
canvas.width = newWidth;
|
1254 |
canvas.height = newHeight;
|
1259 |
'if ( modeIsNormal ) {' .
|
1260 |
|
1261 |
// Common for mode normal
|
1262 |
+
'$("#wppa-ovl-pan-container").css({
|
1263 |
backgroundColor:"' . wppa_opt( 'ovl_theme' ) . '",
|
1264 |
padding:"' . wppa_opt( 'ovl_border_width' ) . 'px",
|
1265 |
borderRadius:"' . wppa_opt( 'ovl_border_radius' ) . 'px",
|
1266 |
width:newWidth
|
1267 |
});
|
1268 |
+
$( "#wppa-pctl-div-' . $mocc . '" ).css({marginLeft:0});' .
|
1269 |
|
1270 |
// Limit specific
|
1271 |
'if ( widthIsLim ) {
|
1272 |
+
$("#wppa-overlay-ic").css({marginLeft:4});
|
1273 |
}
|
1274 |
else {
|
1275 |
+
$("#wppa-overlay-ic").css({marginLeft:(contWidth-newWidth)/2});
|
1276 |
}
|
1277 |
|
1278 |
}' .
|
1281 |
'else {' .
|
1282 |
|
1283 |
// Common for mode fullscreen
|
1284 |
+
'$("#wppa-overlay-ic").css({marginLeft:0});
|
1285 |
+
$("#wppa-ovl-pan-container").css({
|
1286 |
backgroundColor:"transparent",
|
1287 |
padding:0,
|
1288 |
borderRadius:0,
|
1289 |
width:newWidth,
|
1290 |
marginLeft:(contWidth-newWidth)/2
|
1291 |
});
|
1292 |
+
$("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});' .
|
1293 |
|
1294 |
/*
|
1295 |
|
1296 |
if ( widthIsLim ) {
|
1297 |
+
$("#wppa-pctl-div-' . $mocc . '").css({marginLeft:0});
|
1298 |
}
|
1299 |
else {
|
1300 |
+
$("#wppa-pctl-div-' . $mocc . '").css({marginLeft:(contWidth-newWidth)/2});
|
1301 |
|
1302 |
} */ '
|
1303 |
}' .
|
1304 |
|
1305 |
+
'run=4;
|
1306 |
render();
|
1307 |
|
1308 |
' :
|
1309 |
+
'canvasWidth = $(div).parent().width();' .
|
1310 |
'canvasHeight = canvasWidth / 2;' .
|
1311 |
'canvas.width = canvasWidth;' .
|
1312 |
'canvas.height = canvasHeight;' .
|
1313 |
'prevCanvas.width = canvasWidth;' .
|
1314 |
'prevCanvas.height = canvasWidth * ' . $height . ' / ' . $width . ';' .
|
1315 |
+
'run=4;' .
|
1316 |
'render();'
|
1317 |
) .
|
1318 |
|
1360 |
e.offsetY > factor * fromY &&
|
1361 |
e.offsetY < factor * ( fromY + fromHeight ) ) {
|
1362 |
|
1363 |
+
$(prevCanvas).css(\'cursor\',\'grab\');
|
1364 |
}
|
1365 |
else {
|
1366 |
+
$(prevCanvas).css(\'cursor\',\'default\');
|
1367 |
}
|
1368 |
|
1369 |
if ( manualControl && !busy ){
|
1387 |
|
1388 |
manualControl = false;
|
1389 |
' . ( $lightbox ? '' : 'run=1;' ) . '
|
1390 |
+
run=4;
|
1391 |
|
1392 |
}' .
|
1393 |
|
1396 |
</script>
|
1397 |
' . ( $haslink ? '<a>' : '' ) . '';
|
1398 |
|
1399 |
+
return wppa_pan_min( $result );
|
1400 |
}
|
1401 |
|
1402 |
// Minimize inine mixed html / js code
|
1403 |
+
function wppa_pan_min( $result ) {
|
1404 |
|
1405 |
$result = str_replace( "\t", '', $result );
|
1406 |
$result = str_replace( "\n", ' ', $result );
|
1415 |
} while ( $nlen != $olen );
|
1416 |
$result = str_replace( array( ', ', '; ', '( ', ' )', '{ ', ' }', '( "', '" )' ), array( ',', ';', '(', ')', '{', '}', '("', '")' ), $result );
|
1417 |
$result = str_replace( '> <', '><', $result );
|
1418 |
+
wppa_log('dbg','len='.strlen($result));
|
1419 |
return $result;
|
1420 |
}
|
wppa.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
-
* Version: 6.9.
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
@@ -22,8 +22,8 @@ global $wpdb;
|
|
22 |
global $wp_version;
|
23 |
|
24 |
/* WPPA GLOBALS */
|
25 |
-
global $wppa_revno; $wppa_revno = '
|
26 |
-
global $wppa_api_version; $wppa_api_version = '6-9-
|
27 |
|
28 |
/* start timers */
|
29 |
global $wppa_starttime; $wppa_starttime = microtime( true );
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
+
* Version: 6.9.10.005
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
22 |
global $wp_version;
|
23 |
|
24 |
/* WPPA GLOBALS */
|
25 |
+
global $wppa_revno; $wppa_revno = '6910'; // WPPA db version
|
26 |
+
global $wppa_api_version; $wppa_api_version = '6-9-10-005'; // WPPA software version
|
27 |
|
28 |
/* start timers */
|
29 |
global $wppa_starttime; $wppa_starttime = microtime( true );
|