WP Photo Album Plus - Version 8.0.00.016

Version Description

= 7.7.07 =

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

Release Info

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

Code changes from version 8.0.00.015 to 8.0.00.016

js/wppa-all.js CHANGED
@@ -7,12 +7,12 @@ var wppaJsSlideshowVersion="8.0.00.006";function wppaStoreSlideInfo(p,a,e,t,i,w,
7
  // wppa-ajax-front
8
  var wppaJsAjaxVersion="8.0.00.001",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(o,a,r,e,p,t){0<parseInt(p)&&p!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+o+", '"+a+"', '"+r+"', '"+e+"', "+p+" )",100):(wppaRenderAdd=e,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[o]&&(a+="&resp=1"),t&&_wppaCurIdx[o]&&_wppaId[o][_wppaCurIdx[o]]&&(a+="&wppa-hilite="+_wppaId[o][_wppaCurIdx[o]]),wppaCanAjaxRender||!r?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[o]&&_wppaStop(o),jQuery("#wppa-ajax-spin-"+o).fadeIn()},success:function(a,e,p){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+o+"-end"):wppaRenderModal&&r?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(o)})):(jQuery("#wppa-container-"+o).html(a),jQuery("#wppa-button-hide-"+o).show()),wppaCanPushState&&wppaUpdateAddressLine&&r){wppaHis++,r=r.split("&amp;").join("&");try{history.pushState({page:wppaHis,occur:o,type:"html",html:a},"",r)}catch(a){try{history.replaceState({page:wppaHis,occur:o,type:"html"},"",r)}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=o)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(r),wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},error:function(a,e,p){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+p+", status = "+e,"force"),r?document.location.href=r:document.location.reload(!0)},complete:function(a,e,p){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+o).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+o).stop().fadeOut(),window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhotoFromZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=removefromzip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-rem-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-rem-"+r+"-"+o).prop("disabled",!0),jQuery("#admin-choice-rem-"+r+"-"+o).css("text-decoration","")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhotoFromZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,e,p){document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRequestInfo(a,e,p){dialogHtml="<h3>"+wppaRequestInfoDialogText+'</h3><textarea id="wppa-request-info-text-'+a+'" style="width:98%;" ></textarea><div style="clear:both;" ></div><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Send" onclick="wppaAjaxRequestInfoSend( '+a+", "+e+", "+p+' )" /><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Cancel" onclick="jQuery( \'#wppa-modal-container-'+a+"' ).dialog( 'close' );\" /><div style=\"clear:both;\" ></div>";p={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(dialogHtml).dialog(p).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}function wppaAjaxRequestInfoSend(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r+"&emailtext="+jQuery("#wppa-request-info-text-"+o).val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#request-info-"+r+"-"+o).val(t[1]),jQuery("#request-info-"+r+"-"+o).prop("disabled",!0),jQuery("#wppa-modal-container-"+o).dialog("close")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRequestInfoSend failed. Error = "+p+", status = "+e,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),p="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){var e;"classic"==wppaUploadEdit&&((r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>"),e='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+p+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>',r.document.write(e),r.document.write("</head>"),r.document.write("<body>"))},success:function(a,e,p){var t;"classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit&&(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"))},error:function(a,e,p){"classic"==wppaUploadEdit&&r.document.write(e+" "+p),wppaConsoleLog("wppaEditPhoto failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,e,p,t){for(var o,r=jQuery("."+a),n=[],i=jQuery("#"+p).val(),c=0,u=0,a="";c<r.length;)r[c].selected&&(n[u]=r[c].value,u++),c++;""!=(o=jQuery("#"+e).val())&&(n[u]=o),a=n.join(),""==o&&""==p||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+a+"&album="+i,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,e,p){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,e,p){jQuery("#"+t).html('<span style="color:red" >'+p+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDestroyAlbum(a,e){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+e,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+p+", status = "+e,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,e,p){},error:function(a,e,p){wppaConsoleLog("_bumpClickCount failed. Error = "+p+", status = "+e,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){wppaPhotoView[t]=!0},error:function(a,e,p){wppaConsoleLog("_bumpViewCount failed. Error = "+p+", status = "+e,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,e,p){wppaConsoleLog("wppaVoteThumb failed. Error = "+p+", status = "+e,"force")}})}function _wppaRateIt(o,e){var a,p,t;0!=e&&(_wppaSSRuns[o]||(a=_wppaId[o][_wppaCurIdx[o]],p=_wppaMyr[o][_wppaCurIdx[o]],0<(t=_wppaWaitTexts[o][_wppaCurIdx[o]]).length?alert(t):0!=p&&wppaRatingOnce||p<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+e+"&wppa-rating-id="+a+"&wppa-occur="+o+"&wppa-index="+_wppaCurIdx[o]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+o+"-"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+o+"-"+e).stop().fadeTo(100,1),jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");0==t[0]?900==t[1]?(alert(t[2]),_wppaSetRatingDisplay(o)):alert("Error Code="+t[1]+"\n\n"+t[2]):(t[7]&&"likes"==t[7]?(a=t[4].split("|"),jQuery("#wppa-like-"+o).attr("title",a[0]),jQuery("#wppa-liketext-"+o).html(a[1]),"1"==t[3]?jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4]):(_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4],_wppaDisc[t[0]][t[2]]=t[5],_wppaSetRatingDisplay(o),wppaCommentRequiredAfterVote&&0==t[6]&&alert(t[7])),wppaNextOnCallback&&_wppaNextOnCallback(o))},error:function(a,e,p){wppaConsoleLog("_wppaRateIt failed. Error = "+p+", status = "+e,"force")}}))))}function _wppaOvlRateIt(o,r,n,i){0!=r&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+r+"&wppa-rating-id="+o+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+n+"-"+r).stop().fadeTo(100,1),jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){a=t[4].split("|");return jQuery("#wppa-like-0").attr("title",a[0]),jQuery("#wppa-liketext-0").html(a[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+o+"-"+n).attr("title",a[0]),jQuery("#wppa-liketext-"+o+"-"+n).html(a[1]),void("1"==t[3]?jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbup.png"))}_wppaSetRd(n,t[4],".wppa-avg-"),_wppaSetRd(n,t[3],".wppa-rate-"),i||wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,e,p){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxMakeOrigName(a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+e+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,e,p){a=a.split("||");"0"==a[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=a[2]):"file"==wppaArtMonkyLink&&window.open(a[2]),"zip"==wppaArtMonkyLink&&(document.location=a[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+a[1]+"\n\n"+a[2]))},error:function(a,e,p){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,e,p){var t=a.split("||"),o=t[0],r=t[1],a=t[2];3==t.length&&""!=a&&alert("Attention:\n\n"+a),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,e,p){alert("An error occurred:\n"+p+"\nPlease try again")},complete:function(a,e,p){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){_wppaValidateComment(t,a)&&(a="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t,void 0!==jQuery("#wppa-comemail-"+t).val()&&(a+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(a+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(a+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(a+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,e,p){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,e,p){wppaConsoleLog("wppaAjaxComment failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){jQuery("#wppa-comment-spin-"+t).css("display","none")}}))}function wppaUpdatePhotoNew(a){for(var e=["upn-name","upn-description","upn-tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],p="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<e.length;)void 0!==jQuery("#"+e[t]).val()&&(p+="&"+e[t]+"="+jQuery("#"+e[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:p,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,e,p){0<a.length&&alert(a)},error:function(a,e,p){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,t){wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,a="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){a=a.split("|");document.getElementById(t).src=a[0],jQuery(t).attr("title",a[1])},error:function(a,e,p){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+p+", status = "+e,"force")}}))}function wppaAjaxNotify(a,e){a=jQuery(a).prop("checked")?"on":"off",a="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+e+"&onoff="+a;jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxNotify failed. Error = "+p+", status = "+e,"force")}})}
9
  // wppa-lightbox
10
- var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaJsLightboxVersion="8.0.00.015",wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaOvlGlobal=!1,wppaWppaOverlayActivated=!1,wppaOvlTimer=0,wppaSavedContainerWidth=0;function wppaOvlKeyboardHandler(a){var p,t=(p=(null==a?event:a).keyCode,27),a=String.fromCharCode(p).toLowerCase();switch(p){case t:wppaStopVideo(0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(a){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"f":wppaFsOn();break;case"q":case"x":wppaStopVideo(0),wppaOvlHide()}return!1}function wppaOvlShow(a){var p,t,e=jQuery;if(0<wppaOvlActivePanorama&&(wppaSavedContainerHeight=wppaSavedContainerWidth=100),e("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaOvlFirst&&(e("#weaver-final").removeClass("wvr-hide-bang"),wppaKbHandlerInstalled||(e(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),e(window).trigger("wppalightboxstart")),"object"==typeof a){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlTypes=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var l=(a.rel||!!e(a).attr("data-rel")&&e(a).attr("data-rel")).split("[");if(l[1])for(var o,i=l[1],n=e("a"),w=0,r=0;r<n.length;r++)1<(l=!!e(o=n[r]).attr("data-rel")&&e(o).attr("data-rel").split("[")).length&&"wppa"==l[0]&&l[1]==i&&(wppaOvlUrls[w]=o.href,e(o).attr("data-lbtitle")?wppaOvlTitles[w]=wppaRepairScriptTags(e(o).attr("data-lbtitle")):wppaOvlTitles[w]=wppaRepairScriptTags(o.title),wppaOvlIds[w]=e(o).attr("data-id")?e(o).attr("data-id"):"0",wppaOvlAlts[w]=e(o).attr("data-alt")?e(o).attr("data-alt"):"",wppaOvlVideoHtmls[w]=e(o).attr("data-videohtml")?decodeURI(e(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[w]=e(o).attr("data-pdfhtml")?decodeURI(e(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[w]=e(o).attr("data-audiohtml")?decodeURI(e(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[w]=e(o).attr("data-videonatwidth")?e(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[w]=e(o).attr("data-videonatheight")?e(o).attr("data-videonatheight"):"",0<(p=e(o).attr("data-panorama")?e(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[w]=p.substr(t+1),wppaOvlPanoramaIds[w]=p.substr(0,t),wppaOvlTypes[w]="panorama"):(wppaOvlPanoramaHtml[w]="",wppaOvlPanoramaIds[w]=0,wppaOvlTypes[w]=""),0<wppaOvlPdfHtmls[w].length&&(wppaOvlTypes[w]="document"),decodeURI(e(o).attr("data-pdfhtml"))==decodeURI(e(a).attr("data-pdfhtml"))&&decodeURI(e(o).attr("data-videohtml"))==decodeURI(e(a).attr("data-videohtml"))&&decodeURI(e(o).attr("data-audiohtml"))==decodeURI(e(a).attr("data-audiohtml"))&&o.href==a.href&&(wppaOvlIdx=w),w++);else wppaOvlUrls[0]=a.href,e(a).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(e(a).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(a.title),wppaOvlIds[0]=e(a).attr("data-id")?e(a).attr("data-id"):"0",wppaOvlAlts[0]=e(a).attr("data-alt")?e(a).attr("data-alt"):"",wppaOvlVideoHtmls[0]=e(a).attr("data-videohtml")?decodeURI(e(a).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=e(a).attr("data-audiohtml")?decodeURI(e(a).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=e(a).attr("data-pdfhtml")?decodeURI(e(a).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=e(a).attr("data-videonatwidth")?e(a).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=e(a).attr("data-videonatheight")?e(a).attr("data-videonatheight"):"",0<(p=e(a).attr("data-panorama")?e(a).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[0]=p.substr(t+1),wppaOvlPanoramaIds[0]=p.substr(0,t),wppaOvlTypes[0]="panorama"):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0,wppaOvlTypes[0]=""),0<wppaOvlPdfHtmls[0].length&&(wppaOvlTypes[0]="document"),wppaOvlIdx=0}else wppaOvlIdx=a;wppaOvlOpen=!0,e("body").trigger("quitimage"),setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(a){var p=jQuery;p("#wppa-overlay-pc").html(""),wppaOvlCurIdx=a,wppaOvlFirst&&p("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[a],wppaHasAudio=""!=wppaOvlAudioHtmls[a],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[a];var t=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1;if("panorama"!=wppaOvlTypes[t]&&""==wppaOvlVideoHtmls[t]&&wppaOvlOpen&&(document.getElementById("wppa-pre-next").src=wppaOvlUrls[t],wppaConsoleLog("Preloading next "+wppaOvlUrls[t]+" index = "+t)),"panorama"!=wppaOvlTypes[e]&&""==wppaOvlVideoHtmls[e]&&wppaOvlOpen&&(document.getElementById("wppa-pre-prev").src=wppaOvlUrls[e],wppaConsoleLog("Preloading previous "+wppaOvlUrls[e]+" index = "+e)),_bumpViewCount(wppaOvlIds[a]),wppaOvlIsSingle=1==wppaOvlUrls.length,wppaOvlActivePanorama=wppaOvlPanoramaIds[a],wppaOvlActivePanorama,wppaIsFs()||wppaOvlActivePanorama)return wppaOvlActivePanorama?l=wppaOvlPanoramaHtml[a]:wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video></div>":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[a]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" ></iframe></div>':(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" />',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[a]+"</audio>"),l+="</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),0==wppaOvlActivePanorama?(p("#wppa-overlay-ic").html(l),p("#wppa-overlay-pc").html("")):(p("#wppa-overlay-pc").html(l),p("#wppa-overlay-ic").html(""))),0<wppaOvlPanoramaIds[a]&&wppaOvlIsSingle&&p(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout(wppaOvlFormatFull,10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaFsShow(),wppaProtect(),!1;wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);t="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(t=wppaOvlFontColor);wppaOvlUrls.length;0==wppaOvlActivePanorama&&p("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[a]+' id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" ></iframe>':(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(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[a]+"</audio>"),wppaOvlIsVideo=!1),l+="</div>";e=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+t+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >',l+=wppaOvlNavBar(),l+=(e?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[a],l+="</div>",l+="</div>",(0==wppaOvlActivePanorama?p("#wppa-overlay-ic"):p("#wppa-overlay-pc")).html(l),wppaFsShow(),p("#wppa-overlay-img").bind("contextmenu",function(a){return!1}),0==wppaOvlPanoramaIds[a]&&wppaOvlResize(),wppaFsShow(),wppaAdjustControlbar(),!1}function wppaOvlSize(a){var p=jQuery;if(!wppaOvlActivePanorama){var t=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(t&&e&&"none"!=p("#wppa-overlay-bg").css("display")){if(!wppaIsFs()){var l,o=wppaWindowWidth(),i=wppaWindowHeight(),n=wppaOvlIsVideo?(t.clientWidth,l=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),l=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t.clientWidth,l=t.naturalWidth,t.naturalHeight);void 0===l&&(l=t.clientWidth,n=t.clientHeight),(t=(e=(o-3*wppaOvlBorderWidth)/l)<(t=i/n)?e:t)<1&&(l=parseInt(l*t),n=parseInt(n*t));var t=p("#wppa-overlay-txt").height(),t="auto"==wppaOvlTxtHeight?(0==t&&(t=20+2*wppaOvlBorderWidth),i-t-20-2*wppaOvlBorderWidth):i-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,i=parseInt(t*l/n),i=(wppaOvlPadTop,parseInt((o-i)/2),i);n<t&&(wppaOvlPadTop,parseInt((o-l)/2),i=l);o=wppaSavedImageWidth-i<3&&i-wppaSavedImageWidth<3;return i<=10&&(n=180,o=!(l=i=240)),i=parseInt(i),wppaSavedImageWidth=parseInt(i),wppaSavedImageHeight=parseInt(i*n/l),wppaSavedMarginLeft=-parseInt(i/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(i+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+p("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),p("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},a),p("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},a),o?(p("#wppa-ovl-spin").hide(),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},a+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){var a,p=jQuery;if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){if(wppaOvlIsVideo)a=document.getElementById("wppa-overlay-img"),o=wppaOvlVideoNaturalWidths[wppaOvlIdx],i=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)a=document.getElementById("wppa-overlay-img"),o=screen.width,i=screen.height;else{if(a=document.getElementById("wppa-overlay-img"),!(wppaIsIe||a&&a.complete))return void setTimeout(wppaOvlFormatFull,200);o=a.naturalWidth,i=a.naturalHeight}var t=o/i,e=0,l=0,o=0,i=0,i=t<screen.width/screen.height?(e=(screen.width-screen.height*t)/2,l=0,o=screen.height,screen.height*t):(e=0,l=(screen.height-screen.width/t)/2,o=screen.width/t,screen.width),e=parseInt(e),l=parseInt(l),o=parseInt(o);return i=parseInt(i),p(a).css({height:o,width:i,marginLeft:e,marginTop:l,left:0,top:0,maxWidth:1e4}),p(a).css({visibility:"visible"}),p("#wppa-ovl-full-bg").css({overflow:"hidden"}),p("#wppa-ovl-full-bg").scrollTop(0),p("#wppa-ovl-full-bg").scrollLeft(0),p("#wppa-ovl-spin").hide(),p("#wppa-ovl-full-bg").css({visibility:"hidden"}),html=p("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",p("#wppa-overlay-ic").html(html),wppaFsShow(),!0}}function wppaOvlStartAudio(){var a=document.getElementById("wppa-overlay-audio");a&&"function"==typeof a.play&&a.play()}function wppaOvlStartStop(){var a=jQuery;wppaOvlRunning?(wppaOvlRunning=!1,-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&a("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&a("#wppa-ovl-next-btn").css("visibility","visible")),a("#wppa-ovl-stop-btn").hide(),a("#wppa-ovl-start-btn").show()):(wppaOvlRunning=!0,wppaOvlRun(),a("#wppa-ovl-stop-btn").show(),a("#wppa-ovl-start-btn").hide())}function wppaOvlRun(){if(wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout(wppaOvlRun,50);else{if(!wppaIsVideo){var a=document.getElementById("wppa-overlay-img");if(a&&!wppaIsIe&&!a.complete)return void setTimeout(wppaOvlRun,200)}wppaOvlShowNext(),wppaOvlTimer=setTimeout(wppaOvlRun,wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx-1;a<0&&(a=wppaOvlUrls.length-1);var p=document.getElementById("wppa-pre-prev");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowPrev,200),!1}function wppaOvlShowNext(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx+1;a>wppaOvlUrls.length-1&&(a=0);var p=document.getElementById("wppa-pre-next");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowNext,200),!1}function wppaOvlShowSame(){var a,p;wppaOvlOpen&&(a=wppaOvlCurIdx,p=wppaOvlRunning,wppaOvlHide(!0),jQuery("#wppa-ovl-spin").show(),setTimeout(function(){wppaOvlShow(a),p&&setTimeout(wppaOvlStartStop(),wppaOvlSlideSpeed)},1e3))}function wppaOvlHide(a){var p=jQuery;wppaOvlOpen=!1,wppaOvlClosing=!wppaOvlClosing,wppaStopAudio(),a||"lightbox"!=wppaFsPolicy||wppaIsFs()&&wppaFsOff(),p("#wppa-overlay-ic").html(""),p("#wppa-overlay-pc").html(""),p(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,clearTimeout(wppaOvlTimer),p("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,p("body").trigger("quitimage"),document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),p(window).trigger("wppalightboxend"),p(window).trigger("resize"),wppaOvlClosing&&wppaIsMobile?setTimeout(function(){wppaOvlHide(a)},250):(wppaOvlClosing=!1,a||setTimeout(function(){p("#wppa-overlay-bg").hide(),p("#wppa-ovl-spin").hide()},500))}function wppaOvlOnclick(a){switch(wppaOvlOnclickType){case"none":break;case"close":wppaOvlHide();break;case"browse":var p=a.screenX-window.screenX;48<a.clientY&&(p<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}return!0}function wppaInitOverlay(){var e=jQuery;e(".wp-caption").each(function(){var a=e(this),p=a.find("IMG[alt]").attr("alt")||"",t=a.find(".wp-caption-text").html()||"",a=a.find("a"),t=p+"<br>"+t;a.attr("data-lbtitle")||a.attr("data-lbtitle",t)});var a,p,t=e("a"),l=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),p=0;p<t.length;p++)if(a=t[p],e(a).attr("data-rel")?l=e(a).attr("data-rel").split("["):a.rel?l=a.rel.split("["):l[0]="","wppa"==l[0])switch(wppaWppaOverlayActivated=!0,e(a).on("click",function(a){wppaOvlShow(this),a.preventDefault()}),wppaMagnifierCursor){case"pointer":e(a).css("cursor","pointer");break;case"":e(a).css("cursor","default");break;default:e(a).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}e(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaAdjustControlbar)}function wppaOvlResize(){0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout(wppaOvlStartAudio,100))}function wppaOvlImgClick(a){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(a.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var a="";return wppaOvlIsSingle||(a+='<span id="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:block;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-start-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"none":"block")+';" title="Start" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Play-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-stop-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"block":"none")+';" title="Stop" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Pause-Button",wppaOvlIconSize,!0,!0)+"</span>",a+='<span id="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:block;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>"),a+='<span id="wppa-exit-btn-2" style="margin:0 2px;float:right;display:block;" title="Exit" onclick="wppaOvlHide()" >'+wppaSvgHtml("Exit-2",wppaOvlIconSize,!0,!0)+"</span>","lightbox"!=wppaFsPolicy||wppaIsSafari||wppaIsIpad||(a+='<span id="wppa-fulls-btn-2" class="wppa-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen-2",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-exit-fulls-btn-2" class="wppa-exit-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen-2",wppaOvlIconSize,!0,!0)+"</span>"),a}jQuery(document).ready(function(a){wppaInitOverlay()}),jQuery(window).on("resize",function(){wppaOvlResize()});
11
  // wppa-popup
12
  var wppaJsPopupVersion="7.5.03";function wppaPopUp(p,t,e,r,i,a,o,n,d,s){var c,l,u,w,m,g,y,h,x,f,b,v=jQuery("#wppa-thumb-area-"+p).width();if(document.getElementById("x-"+e+"-"+p)){var j=(r?'<div id="wppa-name-'+p+'" style="display:none; padding:1px;" class="wppa_pu_info">'+r+"</div>":"")+(i?'<div id="wppa-desc-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+i+"</div>":"")+(a?'<div id="wppa-rat-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+a+"</div>":"")+(o?'<div id="wppa-ncom-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+o+"</div>":""),k="";switch(wppaThumbTargetBlank&&(k='target="_blank"'),wppaPopupLinkType){case"none":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;case"fullpopup":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" onclick="'+wppaPopupOnclick[e]+'" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;default:t.onclick?(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>"),document.getElementById("wppa-img-"+p).onclick=t.onclick):(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;"><a id="wppa-a" href="'+document.getElementById("x-"+e+"-"+p).href+'" '+k+' style="line-height:1px;" >'+b+"</a>"+j+"</div>"))}}f=document.getElementById("wppa-img-"+p),y=parseInt(d),m=parseInt(s),f&&jQuery(".wppa_pu_info").css("width",(m<y?y:m)-8+"px"),w=parseInt(t.offsetLeft)-7-5-1,l=parseInt(t.offsetTop)-7-1,jQuery("#grid-item-"+p+"-"+e).length&&(w+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("left"))+6,l+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("top"))),h=parseInt(t.clientWidth),g=parseInt(t.clientHeight),x=m<y?y:m,(u=w-parseInt((x-h)/2))<0&&(u=0),v<u+y+16&&(u=v-y-16),(c=l-parseInt((m-g)/2))<0&&(c=0);var I=parseInt((x-y)/2);jQuery("#wppa-img-"+p).css({maxWidth:y+"px"}),jQuery("#wppa-popup-"+p).css({marginLeft:w+"px",marginTop:l+"px"}),jQuery("#wppa-img-"+p).css({marginLeft:0,marginRight:0,width:h+"px",height:g+"px"}),jQuery("#wppa-popup-"+p).stop().animate({marginLeft:u+"px",marginTop:c+"px"},400),jQuery("#wppa-img-"+p).stop().animate({marginLeft:I+"px",marginRight:I+"px",width:y+"px",height:m+"px"},400),setTimeout("wppaPopReady( "+p+" )",400)}function wppaPopReady(p){jQuery("#wppa-name-"+p).show(),jQuery("#wppa-desc-"+p).show(),jQuery("#wppa-rat-"+p).show(),jQuery("#wppa-ncom-"+p).show(),wppaProtect()}function wppaPopDown(p){jQuery("#wppa-popup-"+p).html("")}function wppaFullPopUp(p,t,e,r,i){var a=i+50,o=r+14,n="",d="",s=document.getElementById("i-"+t+"-"+p);s&&(n=s.alt,d=s.title);var c,l=".pdf"==e.substr(e.length-4,e.length),u=window.open("","Print","width="+o+", height="+a+", location=no, resizable=no, menubar=yes ");u.document.write("<html>"),u.document.write("<head>"),u.document.write('<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+"; text-align:center;}</style>"),u.document.write("<title>"+n+"</title>"),u.document.write('<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js" ><\/script><script type="text/javascript">function wppa_downl() {jQuery.ajax( { \turl: \t\t\''+wppaAjaxUrl+"',data: \t\t'action=wppa&wppa-action=makeorigname&photo-id="+t+"&from=popup',async: \ttrue,type: \t\t'GET',timeout: \t10000,beforeSend:\tfunction( xhr ) {},success: \t\tfunction( result, status, xhr ) {result = result.split( \"||\" );if ( result[1] == \"0\" ) {window.open( result[2] );return true;}else {alert( \"Error: \"+result[1]+\" \"+result[2] );return false;}},error: \t\tfunction( xhr, status, error ) {wppaConsoleLog( 'wppaFullPopUp failed. Error = ' + error + ', status = ' + status, 'force' );},} );}<\/script>"),u.document.write('<script type="text/javascript">function wppa_print() {document.getElementById( "wppa_printer" ).style.visibility="hidden"; document.getElementById( "wppa_download" ).style.visibility="hidden"; window.print();}<\/script>'),u.document.write("</head>"),u.document.write("<body>"),u.document.write('<div style="width:'+r+'px;">'),l?u.document.write('<iframe src="'+e+'" style="padding-bottom:6px;width:100%;height:'+(a-60)+'px;" ></iframe><br />'):u.document.write('<img src="'+e+'" style="padding-bottom:6px;" /><br />'),u.document.write('<div style="text-align:center">'+d+"</div>"),l||(c=r-66,u.document.write('<img src="'+wppaImageDirectory+'download.png" id="wppa_download" title="Download" style="position:absolute; top:6px; left:'+c+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_downl();" />'),c=r-30,u.document.write('<img src="'+wppaImageDirectory+'printer.png" id="wppa_printer" title="Print" style="position:absolute; top:6px; left:'+c+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_print();" />')),u.document.write("</div>"),u.document.write("</body>"),u.document.write("</html>"),wppaProtect()}
13
  // wppa-touch
14
  var wppaJsTouchVersion="7.5.03",wppaTriggerElementID=null,wppaFingerCount=0,wppaStartX=0,wppaStartY=0,wppaCurX=0,wppaCurY=0,wppaDeltaX=0,wppaDeltaY=0,wppaHorzDiff=0,wppaVertDiff=0,wppaMinLength=72,wppaSwipeLength=0,wppaSwipeAngle=null,wppaSwipeDirection=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=0,wppaMobileTimeStart=0;function wppaStartTime(){var p=(new Date).getTime();return wppaMobileTimeStart=p,!0}function wppaInTime(){return(new Date).getTime()-wppaMobileTimeStart<250}function wppaTapLink(p,e){wppaInTime()&&(_bumpClickCount(p),document.location.href=e)}function wppaTouchStart(p,e,a){-1==(wppaSwipeMocc=a)&&(wppaSwipeOnLightbox=!0,p.preventDefault()),1==(wppaFingerCount=p.touches.length)?(wppaStartX=p.touches[0].pageX,wppaStartY=p.touches[0].pageY,wppaTriggerElementID=e):wppaTouchCancel()}function wppaTouchMove(p){wppaSwipeOnLightbox&&p.preventDefault(),1==p.touches.length?(wppaCurX=p.touches[0].pageX,wppaCurY=p.touches[0].pageY):wppaTouchCancel()}function wppaTouchEnd(p){wppaSwipeOnLightbox&&p.preventDefault(),1==wppaFingerCount&&0!=wppaCurX&&(wppaSwipeLength=Math.round(Math.sqrt(Math.pow(wppaCurX-wppaStartX,2)+Math.pow(wppaCurY-wppaStartY,2))),wppaMinLength<=wppaSwipeLength&&(wppaCalculateAngle(),wppaDetermineSwipeDirection(),wppaProcessingRoutine())),wppaTouchCancel()}function wppaTouchCancel(){wppaTriggerElementID=wppaSwipeDirection=wppaSwipeAngle=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=wppaSwipeLength=wppaVertDiff=wppaHorzDiff=wppaDeltaY=wppaDeltaX=wppaCurY=wppaCurX=wppaStartY=wppaStartX=wppaFingerCount=0}function wppaCalculateAngle(){var p=wppaStartX-wppaCurX,e=wppaCurY-wppaStartY,a=(Math.round(Math.sqrt(Math.pow(p,2)+Math.pow(e,2))),Math.atan2(e,p));(wppaSwipeAngle=Math.round(180*a/Math.PI))<0&&(wppaSwipeAngle=360-Math.abs(wppaSwipeAngle))}function wppaDetermineSwipeDirection(){wppaSwipeDirection=wppaSwipeAngle<=45&&0<=wppaSwipeAngle||wppaSwipeAngle<=360&&315<=wppaSwipeAngle?"left":135<=wppaSwipeAngle&&wppaSwipeAngle<=225?"right":45<wppaSwipeAngle&&wppaSwipeAngle<135?"down":"up"}function wppaProcessingRoutine(){document.getElementById(wppaTriggerElementID);if(wppaSwipeOnLightbox)"left"==wppaSwipeDirection?wppaOvlShowNext():"right"==wppaSwipeDirection&&wppaOvlShowPrev();else{if("right"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]-1,idx<0){if(!wppaSlideWrap)return;idx=_wppaSlides[wppaSwipeMocc].length-1}wppaGotoKeepState(wppaSwipeMocc,idx)}if("left"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]+1,idx==_wppaSlides[wppaSwipeMocc].length){if(!wppaSlideWrap)return;idx=0}wppaGotoKeepState(wppaSwipeMocc,idx)}}wppaTouchCancel()}
15
  // wppa-zoom
16
- var wppaJsZoomVersion="8.0.00.015";function wppaDoZoomPan(n,a){var p=jQuery;a&&(wppaZoomData[n]=a);var o=l(n);if(!o.initialized&&!o.abort){if(o.isLightbox&&(p("#wppa-ovl-spin").show(),p("#wppa-ovl-pan-container").hide()),!o.image.complete)return wppaConsoleLog("Loading image "+n),void setTimeout(function(){wppaDoZoomPan(n)},200);wppaConsoleLog("Loading image "+n+" complete"),p(image).css({width:image.naturalWidth,height:image.naturalHeight,maxWidth:image.naturalWidth,maxHeight:image.naturalHeight}),o.manual=!1,o.deltaX=0,o.deltaY=0,o.deltaFactor=1,o.busy=!1,o.div=p("#wppa-pan-div-"+o.itemId),o.canvas=document.getElementById("wppa-pan-canvas-"+o.itemId),o.left=p("#wppa-pctl-left-"+o.itemId),o.right=p("#wppa-pctl-right-"+o.itemId),o.up=p("#wppa-pctl-up-"+o.itemId),o.down=p("#wppa-pctl-down-"+o.itemId),o.zoomin=p("#wppa-pctl-zoomin-"+o.itemId),o.zoomout=p("#wppa-pctl-zoomout-"+o.itemId),o.prev=p("#wppa-pctl-prev-"+o.itemId),o.next=p("#wppa-pctl-next-"+o.itemId),o.exit=p("#wppa-exit-btn-2"),o.canvasWidth=o.width,o.canvasHeight=o.height,o.savedCanvasX=0,o.savedCanvasY=0,o.fromHeight=o.image.height,o.fromWidth=o.image.width,o.imageRatio=o.image.width/o.image.height,o.fromX=0,o.fromY=0,o.centerX=o.fromX+o.fromWidth/2,o.centerY=o.fromY+o.fromHeight/2,o.ctx=null,o.buttondown=!1,o.enableManual=!0,o.ctrlbarUpdate=!0,o.pause=!1,o.time=0,o.right.on("touchstart",function(a){e(n)}),o.right.on("touchend",function(a){h(n)}),o.left.on("touchstart",function(a){i(n)}),o.left.on("touchend",function(a){h(n)}),o.up.on("touchstart",function(a){s(n)}),o.up.on("touchend",function(a){h(n)}),o.down.on("touchstart",function(a){r(n)}),o.down.on("touchend",function(a){h(n)}),o.zoomin.on("touchstart",function(a){c(n)}),o.zoomin.on("touchend",function(a){h(n)}),o.zoomout.on("touchstart",function(a){u(n)}),o.zoomout.on("touchend",function(a){h(n)}),o.canvas&&(o.canvas.addEventListener("touchstart",function(a){f(n,a)}),o.canvas.addEventListener("touchmove",function(a){g(n,a)}),o.canvas.addEventListener("touchend",function(a){w(n)})),o.canvas&&(o.canvas.addEventListener("mousedown",function(a){f(n,a)}),o.canvas.addEventListener("mousemove",function(a){g(n,a)}),o.canvas.addEventListener("mouseup",function(a){w(n)}),o.canvas.addEventListener("mouseleave",function(a){(o=l(n)).manual&&l(n,{pause:!0})}),o.canvas.addEventListener("mouseenter",function(a){var t;l(t=n,{pause:!1}).manual&&m(t)}),document.getElementById("wppa-pan-canvas-"+o.itemId).addEventListener("wheel",function(a){var t;t=n,(a=a).preventDefault(),a.stopPropagation(),o=l(t),l(t,{deltaFactor:1+a.deltaY*o.zoomsensitivity/(wppaIsChrome?1e4:1e3),manual:!1,burrondown:!1}),m(t),setTimeout(function(){l(t,{deltaFactor:1})},25)})),o.right.on("mousedown",function(a){e(n)}),o.right.on("mouseup",function(a){h(n)}),o.left.on("mousedown",function(a){i(n)}),o.left.on("mouseup",function(a){h(n)}),o.up.on("mousedown",function(a){s(n)}),o.up.on("mouseup",function(a){h(n)}),o.down.on("mousedown",function(a){r(n)}),o.down.on("mouseup",function(a){h(n)}),o.zoomin.off("mousedown"),o.zoomin.on("mousedown",function(a){c(n)}),o.zoomin.off("mouseup"),o.zoomin.on("mouseup",function(a){h(n)}),o.zoomout.on("mousedown",function(a){u(n)}),o.zoomout.on("mouseup",function(a){h(n)}),o.isLightbox&&(p("body").on("quitimage",function(a){var t;t=n,wppaConsoleLog("Zoom Quit Image"),o=l(t,{abort:!0}),p(o.canvas).hide(),p("#wppa-pctl-div-"+o.itemId).hide()}),p("#wppa-pctl-div-"+o.itemId).on("click",function(a){wppaKillEvent(a)})),o.isLightbox?(p(window).off("resize",wppaOvlShowSame),p(window).on("resize",wppaOvlShowSame)):p(window).on("resize",function(a){t(n)}),t(n),o.initialized=!0,l(n,o),p("#wppa-ovl-spin").hide(),wppaProtect()}function m(a){var t,n,o,e,i,s=l(a);s.canvas&&(L()<s.time+10?wppaConsoleLog("Skipped render "+a):(l(a,{time:L()}),(s.isLightbox&&!wppaOvlOpen||!s.isLightbox&&wppaOvlOpen)&&(s=l(0,{abort:!0})),s.abort?l(a,{manual:!1,buttondown:!1,pause:!1,ctx:null}):s.busy||(wppaDebugCounter++,wppaConsoleLog("Render zoom "+a+" "+wppaDebugCounter),(s=l(a,{busy:!0})).manual||(s.fromX+=s.deltaX,s.fromY+=s.deltaY,t=s.fromHeight/s.deltaFactor,n=s.fromWidth/s.deltaFactor,50<t&&1!=s.deltaFactor&&(wppaIsFs()||t<=s.image.height)?(s.fromX-=(n-s.fromWidth)/2,s.fromY-=(t-s.fromHeight)/2,s.fromWidth=n,s.fromHeight=t):s.buttondown=!1),s.fromX=Math.max(0,Math.min(s.image.width-s.fromWidth,s.fromX)),s.fromY=Math.max(0,Math.min(s.image.height-s.fromHeight,s.fromY)),o=screen.width/screen.height,e=(1-s.image.width/s.fromWidth)*s.canvas.width/2,i=(1-s.image.height/s.fromHeight)*s.canvas.height/2,s.ctx=s.canvas.getContext("2d"),o>s.imageRatio&&t>s.image.height&&wppaIsFs()||o<=s.imageRatio&&n>s.image.width&&wppaIsFs()?(s.enableManual=!1,s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height),s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,e,i,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"default"})):(s.enableManual=!0,s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,0,0,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"grab"})),wppaIsFs()?(s.fsMaskTop=i-(s.canvas.height-screen.height)/2,s.fsMaskLeft=e-(s.canvas.width-screen.width)/2,s.fsMaskBottom=screen.height-s.fsMaskTop,s.fsMaskRight=screen.width-s.fsMaskLeft):(s.fsMaskTop=0,s.fsMaskLeft=0,s.fsMaskBottom=0,s.fsMaskRight=0),s.ctrlbarUpdate&&(wppaAdjustControlbar(),s.ctrlbarUpdate=!1),s.busy=!1,wppaIsElementInViewport(s.canvas)||(s.buttondown=!1),l(a,s),s.pause||!s.manual&&!s.buttondown||setTimeout(function(){m(a)},10),s.pause&&l(a,{pause:!1}))))}function t(a){var t,n,o,e,i,s,r,c,d,u=l(a);u&&(u.isLightbox?(p("#wppa-overlay-pc").css("display",""),e=(n=!wppaIsFs())?(o=window.innerWidth||screen.width,window.innerHeight||screen.height):(o=screen.width,screen.height),r=0,d=(c=8)+(u.controls?u.icsize+10:0)+10,n?(c+=2*u.borderWidth,d+=2*u.borderWidth):c=40,t=n?e-d>(o-c)/u.imageRatio:(screenRatio=screen.width/screen.height,screenRatio<u.imageRatio),n&&t&&(r=(e-(s=(i=o-c)/u.imageRatio)-d)/2+20),n&&!t&&(s=(i=u.imageRatio*(e-(u.controls?u.icsize:0)-48))/u.imageRatio,r=20),!n&&t&&(i=(s=screen.height)*u.imageRatio,r=0),n||t||(s=(i=screen.width)/u.imageRatio,r=(screen.height-s)/2),p("#wppa-ovl-pan-container").css({top:r}),p("#wppa-overlay-pc").css({top:0,left:0}),u.canvasWidth=i,u.canvasHeight=s,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight,n?(p("#wppa-ovl-pan-container").css({backgroundColor:u.backgroundColor,padding:u.padding,borderRadius:u.borderRadius+"px",borderWidth:u.borderWidth+"px",width:i,marginLeft:0}),t?p("#wppa-overlay-pc").css({left:4}):p("#wppa-overlay-pc").css({left:(o-i)/2})):(p("#wppa-overlay-pc").css({marginLeft:0}),p("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",borderWidth:"0px",width:i,left:(o-i)/2,position:"fixed"}))):(u.canvasWidth=p(u.div).parent().width(),u.canvasHeight=u.canvasWidth/u.imageRatio,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight),u.ctrlbarUpdate=!0,l(a,u),setTimeout(function(){m(a)},250),p("#wppa-ovl-pan-container").show())}function e(a){var t=l(a),t=t.image.naturalWidth/t.canvas.width;t<1.5&&(t=1.5),l(a,{deltaX:t*=1.5,buttondown:!0,manual:!1}),m(a)}function i(a){var t=l(a),t=t.image.naturalWidth/t.canvas.width;t<1.5&&(t=1.5),l(a,{deltaX:-(t*=1.5),buttondown:!0,manual:!1}),m(a)}function s(a){var t=l(a),t=t.image.naturalHeight/t.canvas.height;t<1.5&&(t=1.5),l(a,{deltaY:-(t*=1.5),buttondown:!0,manual:!1}),m(a)}function r(a){var t=l(a),t=t.image.naturalHeight/t.canvas.height;t<1.5&&(t=1.5),l(a,{deltaY:t*=1.5,buttondown:!0,manual:!1}),m(a)}function c(a){l(a,{deltaFactor:1.005,buttondown:!0,manual:!1}),m(a)}function u(a){l(a,{deltaFactor:.995,buttondown:!0,manual:!1}),m(a)}function h(a){l(a,{deltaX:0,deltaY:0,deltaFactor:1,buttondown:!1})}function f(a,t){var n=l(a),o=v(t).X,e=v(t).Y;if(wppaIsFs()&&n.isLightbox&&(o<n.fsMaskLeft||o>n.fsMaskRight||e<n.fsMaskTop||e>n.fsMaskBottom))return l(0,{abort:!0}),void jQuery("#wppa-overlay-bg").trigger("click");n.enableManual&&(l(a,{manual:!0,savedCanvasX:o=b(a,t).X,savedCanvasY:e=b(a,t).Y,buttondown:!1}),m(a))}function g(a,t){var n,o=l(a),e=b(a,t).X,i=b(a,t).Y;o.manual&&(n=o.canvas.width/o.fromWidth,t=(o.savedCanvasX-e)/n+o.fromX,n=(o.savedCanvasY-i)/n+o.fromY,0<t&&0<n&&t+o.fromWidth<o.image.width&&n+o.fromHeight<o.image.height&&l(a,{fromX:t,fromY:n,savedCanvasX:e,savedCanvasY:i}))}function w(a){l(a,{manual:!1})}function l(a,t){if(!wppaZoomData[a])return!1;if(t)for(var n in t)wppaZoomData[a][n]=t[n];return wppaZoomData[a]}function v(a){var t;return a=a.touches?(t=a.touches[0].screenX,a.touches[0].screenY):(t=a.screenX,a.screenY),{X:t,Y:a}}function b(a,t){var n;return t=t.touches?(a=l(a),n=t.touches[0].screenX-a.fsMaskLeft,t.touches[0].screenY-a.fsMaskTop):(n=t.offsetX,t.offsetY),{X:n,Y:t}}function L(){return d=new Date,d.getTime()}}
17
  // wppa-spheric
18
- var wppaJsSphericVersion="8.0.00.015";function wppaDoSphericPan(t,e){var s=jQuery;e&&(wppaSphericData[t]=e);var w=f(t,w);if(!w.initialized&&!w.abort&&(!w.isLightbox||wppaOvlOpen)){if(!w.isLightbox&&!wppaIsElementInViewport(s("#wppa-pan-div-"+t)))return setTimeout(function(){wppaDoSphericPan(t)},1e3),void f(t,{vtime:b()});w.wppaRenderer&&(w.wppaRenderer.state.reset(),w.wppaSphere.dispose(),w.wppaSphereMaterial.dispose(),w.texture.dispose()),w.isLightbox&&wppaOvlOpen&&(s("#wppa-ovl-spin").show(),s("#wppa-overlay-ic").html("")),w.manCtrl=!1,w.butDown=!1,w.lon=180,w.lat=0,w.dFov=0,w.abort=!1,w.aspect=2,w.div=s("#wppa-pan-div-"+t),w.left=s("#wppa-pctl-left-"+t),w.right=s("#wppa-pctl-right-"+t),w.up=s("#wppa-pctl-up-"+t),w.down=s("#wppa-pctl-down-"+t),w.zoomin=s("#wppa-pctl-zoomin-"+t),w.zoomout=s("#wppa-pctl-zoomout-"+t),w.prev=s("#wppa-pctl-prev-"+t),w.next=s("#wppa-pctl-next-"+t),w.pause=!1,w.mFakt=wppaIsMobile?"2":"1",w.time=0,w.isLightbox&&(wppaGlobalOvlPanoramaId++,w.uId=wppaGlobalOvlPanoramaId),s(w.div).html(""),w.wppaRenderer||(w.wppaRenderer=new THREE.WebGLRenderer),w.wppaRenderer.setSize(w.width,w.height),s(w.div).append(w.wppaRenderer.domElement),w.wppaScene=new THREE.Scene,w.wppaSphere=new THREE.SphereGeometry(100,100,40),w.wppaSphere.applyMatrix4((new THREE.Matrix4).makeScale(-1,1,1)),w.texture=(new THREE.TextureLoader).load(w.url),w.wppaSphereMaterial=new THREE.MeshBasicMaterial({map:w.texture}),w.wppaSphereMesh=new THREE.Mesh(w.wppaSphere,w.wppaSphereMaterial),w.wppaScene.add(w.wppaSphereMesh),w.right.on("touchstart",function(e){r(t)}),w.right.on("touchend",function(e){v(t)}),w.left.on("touchstart",function(e){u(t)}),w.left.on("touchend",function(e){v(t)}),w.up.on("touchstart",function(e){c(t)}),w.up.on("touchend",function(e){v(t)}),w.down.on("touchstart",function(e){m(t)}),w.down.on("touchend",function(e){v(t)}),w.zoomin.on("touchstart",function(e){p(t)}),w.zoomin.on("touchend",function(e){v(t)}),w.zoomout.on("touchstart",function(e){i(t)}),w.zoomout.on("touchend",function(e){v(t)}),w.enableManual&&0<s("#wppa-pan-div-"+t+" canvas").length&&(s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchstart",function(e){n(t,e)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchmove",function(e){a(t,e)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchend",function(e){o(t)})),w.right.on("mousedown",function(e){r(t)}),w.right.on("mouseup",function(e){v(t)}),w.left.on("mousedown",function(e){u(t)}),w.left.on("mouseup",function(e){v(t)}),w.up.on("mousedown",function(e){c(t)}),w.up.on("mouseup",function(e){v(t)}),w.down.on("mousedown",function(e){m(t)}),w.down.on("mouseup",function(e){v(t)}),w.zoomin.off("mousedown"),w.zoomin.on("mousedown",function(e){p(t)}),w.zoomin.off("mouseup"),w.zoomin.on("mouseup",function(e){v(t)}),w.zoomout.on("mousedown",function(e){i(t)}),w.zoomout.on("mouseup",function(e){v(t)}),w.enableManual&&0<s("#wppa-pan-div-"+t+" canvas").length&&(s("#wppa-pan-div-"+t+" canvas").on("mousedown",function(e){n(t,e)}),s("#wppa-pan-div-"+t+" canvas").on("mousemove",function(e){a(t,e)}),s("#wppa-pan-div-"+t+" canvas").on("mouseup",function(e){o(t)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("wheel",function(e){var n;n=t,(e=e).preventDefault(),e.stopPropagation(),w=f(n),f(n,{manCtrl:!1,butDown:!1,autorun:!1,dX:0,dFov:-e.deltaY*w.zoomsensitivity/(wppaIsChrome?60:6)}),l(n),setTimeout(function(){f(n,{dFov:0})},25)})),w.isLightbox&&(s("body").on("quitimage",function(e){var n;w=f(n=t,{abort:!0,autorun:!1}),clearTimeout(w.timer),clearInterval(w.intervalTimer),s("#wppa-pan-div-"+n+" canvas").hide(),s("#wppa-pctl-div-"+n).hide()}),s("#wppa-pctl-div-"+t).on("click",function(e){wppaKillEvent(e)})),f(t,w),s(window).on("wpparesizeend",function(e){h(t)}),wppaProtect(),s(document).on("tabbychange",function(e){var n;n=t,w.wppaRenderer.state.reset(),w=f(n,{initialized:!1,abort:!0}),setTimeout(function(){f(n,{abort:!1}),wppaDoSphericPan(n)},200),wppaConsoleLog("(setTimeout) redo spheric after tabbychange mocc="+n)}),h(t),w.intervalTimer=setInterval(function(){h(t)},1e3)}function l(e){wppaConsoleLog("spheric render called","force");var n=f(e),t=wppaIsElementInViewport(s("#wppa-pan-div-"+e+" canvas"));if(n.manCtrl||!(b()<n.time+25)){if(!t)return!(b()<n.vtime+1e3)&&(setTimeout(function(){l(e)},1e3),void f(e,{vtime:b()}));f(e,{time:b()}),n.isLightbox&&(!wppaOvlOpen||wppaOvlActivePanorama!=n.id||wppaGlobalOvlPanoramaId>n.uId)&&(abort=!0),n.abort||((n.butDown||n.manCtrl)&&n.autorun&&(n.autorun=!1,n.dX=0),0==n.dX&&0==n.dY&&0==n.dFov&&(n.pause=!0),n.butDown&&(n.pause=!1),n.fov+=n.dFov,n.fov=Math.max(20,Math.min(120,n.fov)),n.wppaCamera=new THREE.PerspectiveCamera(n.fov,n.aspect,1,1e3),n.wppaCamera.target=new THREE.Vector3(0,0,0),n.lon+=n.dX,n.lat+=n.dY,n.lat=Math.max(-85,Math.min(85,n.lat)),n.wppaCamera.target.x=500*Math.sin(THREE.Math.degToRad(90-n.lat))*Math.cos(THREE.Math.degToRad(n.lon)),n.wppaCamera.target.y=500*Math.cos(THREE.Math.degToRad(90-n.lat)),n.wppaCamera.target.z=500*Math.sin(THREE.Math.degToRad(90-n.lat))*Math.sin(THREE.Math.degToRad(n.lon)),n.wppaCamera.lookAt(n.wppaCamera.target),n.wppaRenderer&&n.wppaRenderer.render(n.wppaScene,n.wppaCamera),wppaAdjustControlbar(),s("#wppa-ovl-spin").hide(),n.manCtrl,(n.autorun||!n.pause&&(n.manCtrl||n.butDown))&&n.wppaRenderer&&(n.timer=setTimeout(function(){l(e)},25)),f(e,n))}}function h(e,n){wppaConsoleLog("Resize spheric mocc "+e+" called by "+h.caller,"force");var t=!wppaIsFs();if(w=f(e)){if(w.isLightbox){if(!wppaOvlOpen)return;s("#wppa-overlay-pc").css("display",""),s("#wppa-overlay-pc").css("width","");var a,o,p=(t=!wppaIsFs())?(o=window.innerWidth||screen.width,window.innerHeight||screen.height):(o=screen.width,screen.height),i=8,r=8+(w.controls?w.icsize+10:0)+30;t&&(i+=2*w.borderWidth,r+=2*w.borderWidth),a=(o-i)/2+r<p,r=t?a?(p-(c=(u=o-i)/2)-r)/2+20:(u=2*(c=p-r),20):(u=screen.width,c=screen.height,0),w.aspect=u/c,s("#wppa-ovl-pan-container").css({top:r}),s("#wppa-overlay-pc").css({top:0}),t?(s("#wppa-ovl-pan-container").css({backgroundColor:w.backgroundColor,padding:w.padding+"px",borderRadius:w.borderRadius+"px",width:u}),a?s("#wppa-overlay-pc").css({left:4}):s("#wppa-overlay-pc").css({left:(o-u)/2})):s("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",width:u,left:(o-u)/2}),w.wppaRenderer.setSize(u,c)}else{var u=s(w.div).parent().width(),c=parseInt(u/2);if(!w.wppaRenderer)return;w.wppaRenderer.setSize(u,c)}w.width=u,w.height=c,f(e,w),w.timer=setTimeout(function(){l(e)},250)}}function n(e,n){n.preventDefault(),n.stopPropagation(),w=f(e,{manCtrl:!0,butDown:!1,autorun:!1,dX:0}),n.touches?f(e,{sX:n.touches[0].clientX,sY:n.touches[0].clientY}):f(e,{sX:n.clientX,sY:n.clientY}),f(e,{sLon:w.lon,sLat:w.lat}),l(e)}function a(e,n){n.preventDefault(),n.stopPropagation(),(w=f(e)).manCtrl&&(n.touches?f(e,{lon:.1*(w.sX-n.touches[0].clientX)+w.sLon,lat:.1*(n.touches[0].clientY-w.sY)+w.sLat,pause:!1}):f(e,{lon:.1*(w.sX-n.clientX)+w.sLon,lat:.1*(n.clientY-w.sY)+w.sLat,pause:!1}),l(e))}function o(e){f(e,{manCtrl:!1})}function p(e){w=f(e),f(e,{dFov:-.4*w.mFakt,butDown:!0}),l(e)}function i(e){w=f(e),f(e,{dFov:.4*w.mFakt,butDown:!0}),l(e)}function r(e){w=f(e),f(e,{dX:.2*w.mFakt,butDown:!0}),l(e)}function u(e){w=f(e),f(e,{dX:-.2*w.mFakt,butDown:!0}),l(e)}function c(e){w=f(e),f(e,{dY:.2*w.mFakt,butDown:!0}),l(e)}function m(e){w=f(e),f(e,{dY:-.2*w.mFakt,butDown:!0}),l(e)}function v(e){w=f(e),f(e,{dX:0,dY:0,dFov:0,butDown:!1})}function f(e,n){if(!wppaSphericData[e])return!1;if(n)for(var t in n)wppaSphericData[e][t]=n[t];return wppaSphericData[e]}function b(){return d=new Date,d.getTime()}}
7
  // wppa-ajax-front
8
  var wppaJsAjaxVersion="8.0.00.001",wppaRenderAdd=!1,wppaWaitForCounter=0;function wppaDoAjaxRender(o,a,r,e,p,t){0<parseInt(p)&&p!=wppaWaitForCounter?setTimeout("wppaDoAjaxRender( "+o+", '"+a+"', '"+r+"', '"+e+"', "+p+" )",100):(wppaRenderAdd=e,""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[o]&&(a+="&resp=1"),t&&_wppaCurIdx[o]&&_wppaId[o][_wppaCurIdx[o]]&&(a+="&wppa-hilite="+_wppaId[o][_wppaCurIdx[o]]),wppaCanAjaxRender||!r?jQuery.ajax({url:a,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){_wppaSSRuns[o]&&_wppaStop(o),jQuery("#wppa-ajax-spin-"+o).fadeIn()},success:function(a,e,p){var t;if(wppaRenderAdd?jQuery(wppaRenderAdd+a).insertBefore("#wppa-container-"+o+"-end"):wppaRenderModal&&r?(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"32px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"),jQuery(".ui-button").on("click",function(){_wppaStop(o)})):(jQuery("#wppa-container-"+o).html(a),jQuery("#wppa-button-hide-"+o).show()),wppaCanPushState&&wppaUpdateAddressLine&&r){wppaHis++,r=r.split("&amp;").join("&");try{history.pushState({page:wppaHis,occur:o,type:"html",html:a},"",r)}catch(a){try{history.replaceState({page:wppaHis,occur:o,type:"html"},"",r)}catch(a){wppaConsoleLog("Ajax rendering: History stack update failed","force")}}0==wppaFirstOccur&&(wppaFirstOccur=o)}wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(r),wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax")},error:function(a,e,p){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+p+", status = "+e,"force"),r?document.location.href=r:document.location.reload(!0)},complete:function(a,e,p){wppaWaitForCounter++,!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+o).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery("#wppa-ajax-spin-"+o).stop().fadeOut(),window.dispatchEvent(new Event("resize")),wppaProtect()}}):(document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"nonajax")))}function wppaAjaxApprovePhoto(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhoto(t,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){rtxt=a.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[t]+"-"+t).attr("alt","removed"),wppaNext(t)):(jQuery(".wppa-approve-"+o).css("display","none"),jQuery(".thumbnail-frame-photo-"+o).css("display","none")):rtxt[3]?(alert(rtxt[3]),jQuery("#wppa-delete-"+o).css("text-decoration","line-through")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxApproveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a?jQuery(".wppa-approve-"+t).css("display","none"):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemoveComment(t){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+t,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){"OK"==a.split("||")[0]?(jQuery(".wppa-approve-"+t).css("display","none"),jQuery(".wppa-comment-"+t).css("display","none")):alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxAddPhotoToZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-"+r+"-"+o).html(t[1]),jQuery("#admin-choice-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-"+r+"-"+o).prop("disabled",!0)):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRemovePhotoFromZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=removefromzip&photo-id="+r,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#admin-choice-rem-"+r+"-"+o).val(t[1]),jQuery("#admin-choice-rem-"+r+"-"+o).prop("disabled",!0),jQuery("#admin-choice-rem-"+r+"-"+o).css("text-decoration","")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRemovePhotoFromZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,success:function(a,e,p){document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxRequestInfo(a,e,p){dialogHtml="<h3>"+wppaRequestInfoDialogText+'</h3><textarea id="wppa-request-info-text-'+a+'" style="width:98%;" ></textarea><div style="clear:both;" ></div><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Send" onclick="wppaAjaxRequestInfoSend( '+a+", "+e+", "+p+' )" /><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="Cancel" onclick="jQuery( \'#wppa-modal-container-'+a+"' ).dialog( 'close' );\" /><div style=\"clear:both;\" ></div>";p={modal:!0,resizable:!0,width:wppaGetContainerWidth(a),show:{effect:"fadeIn",duration:400},closeText:""};jQuery("#wppa-modal-container-"+a).html(dialogHtml).dialog(p).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close")}function wppaAjaxRequestInfoSend(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=requestinfo&photo-id="+r+"&emailtext="+jQuery("#wppa-request-info-text-"+o).val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){var t=a.split("||");"OK"==t[0]?(jQuery("#request-info-"+r+"-"+o).val(t[1]),jQuery("#request-info-"+r+"-"+o).prop("disabled",!0),jQuery("#wppa-modal-container-"+o).dialog("close")):alert(a),n&&document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxRequestInfoSend failed. Error = "+p+", status = "+e,"force")}})}function wppaEditPhoto(o,a){var r,t=String(a),p="Edit Photo "+t,n=wppaEditPhotoWidth;screen.availWidth<n&&(n=screen.availWidth),jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+t+"&moccur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){var e;"classic"==wppaUploadEdit&&((r=window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+n+", height=512",!0)).document.write("<! DOCTYPE html>"),r.document.write("<html>"),r.document.write("<head>"),e='<meta name="viewport" content="width='+n+'" ><link rel="stylesheet" id="wppa_style-css" href="'+wppaWppaUrl+"/wppa-admin-styles.css?ver="+wppaVersion+'" type="text/css" media="all" /><link rel="stylesheet" id="theme_style" href="'+wppaThemeStyles+'" type="text/css" media="all" /><link rel="stylesheet" id="wppa_cropper" href="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.css?ver="+wppaVersion+'" type="text/css" media="all" /><style>body {font-family: sans-serif; font-size: 12px; line-height: 1.4em;}a {color: #21759B;}</style><script type="text/javascript" src="'+wppaIncludeUrl+"/js/jquery/jquery.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-utils.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/js/wppa-admin-scripts.js?ver="+wppaVersion+'"><\/script><script type="text/javascript" src="'+wppaWppaUrl+"/vendor/cropperjs/dist/cropper.min.js?ver="+wppaVersion+'"><\/script><title>'+p+'</title><script type="text/javascript">wppaAjaxUrl="'+wppaAjaxUrl+'";<\/script>',r.document.write(e),r.document.write("</head>"),r.document.write("<body>"))},success:function(a,e,p){var t;"classic"==wppaUploadEdit&&r.document.write(a),"new"==wppaUploadEdit&&(t={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:""},jQuery("#wppa-modal-container-"+o).html(a).dialog(t).dialog("open"),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5}),jQuery(".ui-dialog-titlebar").css({lineHeight:"0px",height:"24px"}),jQuery(".ui-button").css({backgroundImage:wppaModalQuitImg,padding:0,position:"absolute",right:"8px",top:"8px",width:"16px",height:"16px"}),jQuery(".ui-button").attr("title","Close"))},error:function(a,e,p){"classic"==wppaUploadEdit&&r.document.write(e+" "+p),wppaConsoleLog("wppaEditPhoto failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){"classic"==wppaUploadEdit&&(r.document.write('<script>wppaPhotoStatusChange( "'+t+'" )<\/script>'),r.document.write("<script>\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){window.dispatchEvent(new Event(\"DOMContentLoaded\", { 'bubbles': true }))},1000);\t\t\t\t\t\t\t\t\t\t\t\t<\/script>"),r.document.write("</body>"),r.document.write("</html>"))}})}function wppaPrevTags(a,e,p,t){for(var o,r=jQuery("."+a),n=[],i=jQuery("#"+p).val(),c=0,u=0,a="";c<r.length;)r[c].selected&&(n[u]=r[c].value,u++),c++;""!=(o=jQuery("#"+e).val())&&(n[u]=o),a=n.join(),""==o&&""==p||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=sanitizetags&tags="+a+"&album="+i,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#"+t).html("Working...")},success:function(a,e,p){jQuery("#"+t).html(wppaTrim(a,","))},error:function(a,e,p){jQuery("#"+t).html('<span style="color:red" >'+p+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxDestroyAlbum(a,e){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+a+"&nonce="+e,async:!0,type:"GET",timeout:6e4,success:function(a,e,p){alert(a+"\nPage will be reloaded"),document.location.reload(!0)},error:function(a,e,p){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+p+", status = "+e,"force")}}),!1}function _bumpClickCount(a){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+a+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,success:function(a,e,p){},error:function(a,e,p){wppaConsoleLog("_bumpClickCount failed. Error = "+p+", status = "+e,"force")}})}function _bumpViewCount(t){wppaBumpViewCount&&(wppaPhotoView[t]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+t+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){wppaPhotoView[t]=!0},error:function(a,e,p){wppaConsoleLog("_bumpViewCount failed. Error = "+p+", status = "+e,"force")}}))}function wppaVoteThumb(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+t+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,success:function(a,e,p){jQuery("#wppa-vote-button-"+t+"-"+o).val(wppaVotedForMe)},error:function(a,e,p){wppaConsoleLog("wppaVoteThumb failed. Error = "+p+", status = "+e,"force")}})}function _wppaRateIt(o,e){var a,p,t;0!=e&&(_wppaSSRuns[o]||(a=_wppaId[o][_wppaCurIdx[o]],p=_wppaMyr[o][_wppaCurIdx[o]],0<(t=_wppaWaitTexts[o][_wppaCurIdx[o]]).length?alert(t):0!=p&&wppaRatingOnce||p<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+e+"&wppa-rating-id="+a+"&wppa-occur="+o+"&wppa-index="+_wppaCurIdx[o]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#wppa-rate-"+o+"-"+e).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+o+"-"+e).stop().fadeTo(100,1),jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");0==t[0]?900==t[1]?(alert(t[2]),_wppaSetRatingDisplay(o)):alert("Error Code="+t[1]+"\n\n"+t[2]):(t[7]&&"likes"==t[7]?(a=t[4].split("|"),jQuery("#wppa-like-"+o).attr("title",a[0]),jQuery("#wppa-liketext-"+o).html(a[1]),"1"==t[3]?jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4]):(_wppaMyr[t[0]][t[2]]=t[3],_wppaAvg[t[0]][t[2]]=t[4],_wppaDisc[t[0]][t[2]]=t[5],_wppaSetRatingDisplay(o),wppaCommentRequiredAfterVote&&0==t[6]&&alert(t[7])),wppaNextOnCallback&&_wppaNextOnCallback(o))},error:function(a,e,p){wppaConsoleLog("_wppaRateIt failed. Error = "+p+", status = "+e,"force")}}))))}function _wppaOvlRateIt(o,r,n,i){0!=r&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+r+"&wppa-rating-id="+o+"&wppa-occur=1&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"tick.png"),jQuery(".wppa-rate-"+n+"-"+r).stop().fadeTo(100,1),jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"spinner.gif"),jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"spinner.gif")},success:function(a,e,p){var t=a.split("||");if(0==t[0])900==t[1]?alert(t[2]):alert("Error Code="+t[1]+"\n\n"+t[2]),jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"cross.png");else{if(t[7]&&"likes"==t[7]){a=t[4].split("|");return jQuery("#wppa-like-0").attr("title",a[0]),jQuery("#wppa-liketext-0").html(a[1]),"1"==t[3]?jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-0").attr("src",wppaImageDirectory+"thumbup.png"),jQuery("#wppa-like-"+o+"-"+n).attr("title",a[0]),jQuery("#wppa-liketext-"+o+"-"+n).html(a[1]),void("1"==t[3]?jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbup.png"))}_wppaSetRd(n,t[4],".wppa-avg-"),_wppaSetRd(n,t[3],".wppa-rate-"),i||wppaNextOnCallback&&wppaOvlShowNext()}},error:function(a,e,p){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+p+", status = "+e,"force")}})}function wppaAjaxMakeOrigName(a,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=makeorigname&photo-id="+e+"&from=fsname",async:!0,type:"GET",timeout:6e4,beforeSend:function(a){},success:function(a,e,p){a=a.split("||");"0"==a[1]?(wppaIsSafari?"file"==wppaArtMonkyLink&&(wppaWindowReference.location=a[2]):"file"==wppaArtMonkyLink&&window.open(a[2]),"zip"==wppaArtMonkyLink&&(document.location=a[2])):(wppaIsSafari&&"file"==wppaArtMonkyLink&&wppaWindowReference.close(),alert("Error: "+a[1]+"\n\n"+a[2]))},error:function(a,e,p){wppaConsoleLog("wppaAjaxMakeOrigName failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}function wppaAjaxDownloadAlbum(t,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(a){jQuery("#dwnspin-"+t+"-"+o).css("display","")},success:function(a,e,p){var t=a.split("||"),o=t[0],r=t[1],a=t[2];3==t.length&&""!=a&&alert("Attention:\n\n"+a),"OK"==r?document.location=o:alert("The server could not complete the request.\nPlease try again.")},error:function(a,e,p){alert("An error occurred:\n"+p+"\nPlease try again")},complete:function(a,e,p){jQuery("#dwnspin-"+t+"-"+o).css("display","none")}})}function wppaAjaxComment(t,a){_wppaValidateComment(t,a)&&(a="action=wppa&wppa-action=do-comment&photo-id="+a+"&comname="+jQuery("#wppa-comname-"+t).val()+"&comment="+wppaEncode(jQuery("#wppa-comment-"+t).val())+"&wppa-captcha="+jQuery("#wppa-captcha-"+t).val()+"&wppa-nonce="+jQuery("#wppa-nonce-"+t).val()+"&moccur="+t,void 0!==jQuery("#wppa-comemail-"+t).val()&&(a+="&comemail="+jQuery("#wppa-comemail-"+t).val()),void 0!==jQuery("#wppa-comment-edit-"+t).val()&&(a+="&comment-edit="+jQuery("#wppa-comment-edit-"+t).val()),void 0!==jQuery("#wppa-returnurl-"+t).val()&&(a+="&returnurl="+encodeURIComponent(jQuery("#wppa-returnurl-"+t).val())),jQuery("#db-agree-"+t).prop("checked")&&(a+="&db-agree=yes"),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:6e4,beforeSend:function(a){jQuery("#wppa-comment-spin-"+t).css("display","inline")},success:function(a,e,p){a=a.replace(/\\/g,""),jQuery("#wppa-comments-"+t).html(a),_wppaCurIdx[t]&&(_wppaCommentHtml[t][_wppaCurIdx[t]]=a),wppaOpenComments(t)},error:function(a,e,p){wppaConsoleLog("wppaAjaxComment failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){jQuery("#wppa-comment-spin-"+t).css("display","none")}}))}function wppaUpdatePhotoNew(a){for(var e=["upn-name","upn-description","upn-tags","custom_0","custom_1","custom_2","custom_3","custom_4","custom_5","custom_6","custom_7","custom_8","custom_9"],p="action=wppa&wppa-action=update-photo-new&photo-id="+a+"&wppa-nonce="+jQuery("#wppa-nonce-"+a).val(),t=0;t<e.length;)void 0!==jQuery("#"+e[t]).val()&&(p+="&"+e[t]+"="+jQuery("#"+e[t]).val()),t++;jQuery.ajax({url:wppaAjaxUrl,data:p,async:!1,type:"POST",timeout:1e4,beforeSend:function(a){},success:function(a,e,p){0<a.length&&alert(a)},error:function(a,e,p){alert(result),wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+p+", status = "+e,"force")},complete:function(a,e,p){}})}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(a,t){wppaLastQrcodeUrl!=a&&(wppaLastQrcodeUrl=a,a="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(a),jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){a=a.split("|");document.getElementById(t).src=a[0],jQuery(t).attr("title",a[1])},error:function(a,e,p){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+p+", status = "+e,"force")}}))}function wppaAjaxNotify(a,e){a=jQuery(a).prop("checked")?"on":"off",a="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+e+"&onoff="+a;jQuery.ajax({url:wppaAjaxUrl,data:a,async:!0,type:"POST",timeout:1e4,success:function(a,e,p){alert(a)},error:function(a,e,p){wppaConsoleLog("wppaAjaxNotify failed. Error = "+p+", status = "+e,"force")}})}
9
  // wppa-lightbox
10
+ var panType,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaJsLightboxVersion="8.0.00.016",wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaOvlGlobal=!1,wppaWppaOverlayActivated=!1,wppaOvlTimer=0,wppaSavedContainerWidth=0,wppaSavedContainerHeight=0;function wppaOvlKeyboardHandler(p){var a,t=(a=(null==p?event:p).keyCode,27),p=String.fromCharCode(a).toLowerCase();switch(a){case t:wppaStopVideo(0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(p){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"f":wppaFsOn();break;case"q":case"x":wppaStopVideo(0),wppaOvlHide()}return!1}function wppaOvlShow(p){var a,t,e=jQuery;if(wppaOvlActivePanorama,e("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaOvlFirst&&(e("#weaver-final").removeClass("wvr-hide-bang"),wppaKbHandlerInstalled||(e(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),e(window).trigger("wppalightboxstart")),"object"==typeof p){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlTypes=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var l=(p.rel||!!e(p).attr("data-rel")&&e(p).attr("data-rel")).split("[");if(l[1])for(var o,i=l[1],w=e("a"),n=0,r=0;r<w.length;r++)1<(l=!!e(o=w[r]).attr("data-rel")&&e(o).attr("data-rel").split("[")).length&&"wppa"==l[0]&&l[1]==i&&(wppaOvlUrls[n]=o.href,e(o).attr("data-lbtitle")?wppaOvlTitles[n]=wppaRepairScriptTags(e(o).attr("data-lbtitle")):wppaOvlTitles[n]=wppaRepairScriptTags(o.title),wppaOvlIds[n]=e(o).attr("data-id")?e(o).attr("data-id"):"0",wppaOvlAlts[n]=e(o).attr("data-alt")?e(o).attr("data-alt"):"",wppaOvlVideoHtmls[n]=e(o).attr("data-videohtml")?decodeURI(e(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[n]=e(o).attr("data-pdfhtml")?decodeURI(e(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[n]=e(o).attr("data-audiohtml")?decodeURI(e(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[n]=e(o).attr("data-videonatwidth")?e(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[n]=e(o).attr("data-videonatheight")?e(o).attr("data-videonatheight"):"",a=e(o).attr("data-panorama")?e(o).attr("data-panorama"):"",panType=e(o).attr("data-pantype")?e(o).attr("data-pantype"):"",0<a.length?(wppaOvlHasPanoramas=!0,t=a.indexOf("."),wppaOvlPanoramaHtml[n]=a.substr(t+1),wppaOvlPanoramaIds[n]=a.substr(0,t),wppaOvlTypes[n]=panType):(wppaOvlPanoramaHtml[n]="",wppaOvlPanoramaIds[n]=0,wppaOvlTypes[n]=""),0<wppaOvlPdfHtmls[n].length&&(wppaOvlTypes[n]="document"),decodeURI(e(o).attr("data-pdfhtml"))==decodeURI(e(p).attr("data-pdfhtml"))&&decodeURI(e(o).attr("data-videohtml"))==decodeURI(e(p).attr("data-videohtml"))&&decodeURI(e(o).attr("data-audiohtml"))==decodeURI(e(p).attr("data-audiohtml"))&&o.href==p.href&&(wppaOvlIdx=n),n++);else wppaOvlUrls[0]=p.href,e(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(e(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlIds[0]=e(p).attr("data-id")?e(p).attr("data-id"):"0",wppaOvlAlts[0]=e(p).attr("data-alt")?e(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=e(p).attr("data-videohtml")?decodeURI(e(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=e(p).attr("data-audiohtml")?decodeURI(e(p).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=e(p).attr("data-pdfhtml")?decodeURI(e(p).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=e(p).attr("data-videonatwidth")?e(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=e(p).attr("data-videonatheight")?e(p).attr("data-videonatheight"):"",a=e(p).attr("data-panorama")?e(p).attr("data-panorama"):"",panType=e(p).attr("data-pantype")?e(p).attr("data-pantype"):"",0<a.length?(wppaOvlHasPanoramas=!0,t=a.indexOf("."),wppaOvlPanoramaHtml[0]=a.substr(t+1),wppaOvlPanoramaIds[0]=a.substr(0,t),wppaOvlTypes[0]=panType):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0,wppaOvlTypes[0]=""),0<wppaOvlPdfHtmls[0].length&&(wppaOvlTypes[0]="document"),wppaOvlIdx=0}else wppaOvlIdx=p;wppaOvlOpen=!0,e("body").trigger("quitimage"),setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(p){var a=jQuery;a("#wppa-overlay-ic").html("").hide(),a("#wppa-overlay-pc").html("").hide(),a("#wppa-overlay-fpc").html("").hide(),a("#wppa-overlay-zpc").html("").hide(),wppaOvlCurIdx=p,wppaOvlFirst&&a("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[p];var t=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1;if(""==wppaOvlTypes[t]&&""==wppaOvlVideoHtmls[t]&&wppaOvlOpen&&(document.getElementById("wppa-pre-next").src=wppaOvlUrls[t],wppaConsoleLog("Preloading next "+wppaOvlUrls[t]+" index = "+t)),""==wppaOvlTypes[e]&&""==wppaOvlVideoHtmls[e]&&wppaOvlOpen&&(document.getElementById("wppa-pre-prev").src=wppaOvlUrls[e],wppaConsoleLog("Preloading previous "+wppaOvlUrls[e]+" index = "+e)),_bumpViewCount(wppaOvlIds[p]),wppaOvlIsSingle=1==wppaOvlUrls.length,wppaOvlActivePanorama=wppaOvlPanoramaIds[p],wppaOvlActivePanorama,wppaIsFs()||wppaOvlActivePanorama){if(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 );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video></div>":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[p]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" ></iframe></div>':(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[p]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),l+="</div>"),!wppaIsVideo&&!wppaHasAudio||wppaOvlFsPhotoId!=wppaPhotoId||0==wppaPhotoId)if(wppaStopVideo(0),wppaStopAudio(),0<wppaOvlActivePanorama)switch(wppaOvlTypes[p]){case"spheric":a("#wppa-overlay-pc").html(l).show();break;case"flat":a("#wppa-overlay-fpc").html(l).show();break;case"zoom":a("#wppa-overlay-zpc").html(l).show()}else a("#wppa-overlay-ic").html(l).show();return 0<wppaOvlPanoramaIds[p]&&wppaOvlIsSingle&&a(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout(wppaOvlFormatFull,10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,""==wppaOvlTypes[p]&&a("#wppa-overlay-ic").show(),wppaFsShow(),wppaProtect(),!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);t="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(t=wppaOvlFontColor);wppaOvlUrls.length;0==wppaOvlActivePanorama&&a("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[p]+' id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" ></iframe>':(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[p]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),wppaOvlIsVideo=!1),l+="</div>";e=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+t+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >',l+=wppaOvlNavBar(),l+=(e?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p],l+="</div>",l+="</div>",(0==wppaOvlActivePanorama?a("#wppa-overlay-ic"):a("#wppa-overlay-pc")).html(l),""!=wppaOvlTypes[p]&&"document"!=wppaOvlTypes[p]||a("#wppa-overlay-ic").show(),wppaFsShow(),a("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),0==wppaOvlPanoramaIds[p]&&wppaOvlResize(),wppaFsShow(),wppaAdjustControlbar(),!1}function wppaOvlSize(p){var a=jQuery;if(!wppaOvlActivePanorama){var t=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(t&&e&&"none"!=a("#wppa-overlay-bg").css("display")){if(!wppaIsFs()){var l,o=wppaWindowWidth(),i=wppaWindowHeight(),w=wppaOvlIsVideo?(t.clientWidth,l=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),l=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t.clientWidth,l=t.naturalWidth,t.naturalHeight);void 0===l&&(l=t.clientWidth,w=t.clientHeight),(t=(e=(o-3*wppaOvlBorderWidth)/l)<(t=i/w)?e:t)<1&&(l=parseInt(l*t),w=parseInt(w*t));var t=a("#wppa-overlay-txt").height(),t="auto"==wppaOvlTxtHeight?(0==t&&(t=20+2*wppaOvlBorderWidth),i-t-20-2*wppaOvlBorderWidth):i-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,i=parseInt(t*l/w),i=(wppaOvlPadTop,parseInt((o-i)/2),i);w<t&&(wppaOvlPadTop,parseInt((o-l)/2),i=l);o=wppaSavedImageWidth-i<3&&i-wppaSavedImageWidth<3;return i<=10&&(w=180,o=!(l=i=240)),i=parseInt(i),wppaSavedImageWidth=parseInt(i),wppaSavedImageHeight=parseInt(i*w/l),wppaSavedMarginLeft=-parseInt(i/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(i+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+a("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),a("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),a("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),o?(a("#wppa-ovl-spin").hide(),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){var p,a=jQuery;if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),o=wppaOvlVideoNaturalWidths[wppaOvlIdx],i=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)p=document.getElementById("wppa-overlay-img"),o=screen.width,i=screen.height;else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout(wppaOvlFormatFull,200);o=p.naturalWidth,i=p.naturalHeight}var t=o/i,e=0,l=0,o=0,i=0,i=t<screen.width/screen.height?(e=(screen.width-screen.height*t)/2,l=0,o=screen.height,screen.height*t):(e=0,l=(screen.height-screen.width/t)/2,o=screen.width/t,screen.width),e=parseInt(e),l=parseInt(l),o=parseInt(o);return i=parseInt(i),a(p).css({height:o,width:i,marginLeft:e,marginTop:l,left:0,top:0,maxWidth:1e4}),a(p).css({visibility:"visible"}),a("#wppa-ovl-full-bg").css({overflow:"hidden"}),a("#wppa-ovl-full-bg").scrollTop(0),a("#wppa-ovl-full-bg").scrollLeft(0),a("#wppa-ovl-spin").hide(),a("#wppa-ovl-full-bg").css({visibility:"hidden"}),html=a("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",a("#wppa-overlay-ic").html(html),wppaFsShow(),!0}}function wppaOvlStartAudio(){var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&p.play()}function wppaOvlStartStop(){var p=jQuery;wppaOvlRunning?(wppaOvlRunning=!1,-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&p("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&p("#wppa-ovl-next-btn").css("visibility","visible")),p("#wppa-ovl-stop-btn").hide(),p("#wppa-ovl-start-btn").show()):(wppaOvlRunning=!0,wppaOvlRun(),p("#wppa-ovl-stop-btn").show(),p("#wppa-ovl-start-btn").hide())}function wppaOvlRun(){if(wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout(wppaOvlRun,50);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return void setTimeout(wppaOvlRun,200)}wppaOvlShowNext(),wppaOvlTimer=setTimeout(wppaOvlRun,wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var p=wppaOvlCurIdx-1;p<0&&(p=wppaOvlUrls.length-1);var a=document.getElementById("wppa-pre-prev");return""!=wppaOvlVideoHtmls[p]||wppaIsIe||a.complete||!wppaOvlOpen?wppaOvlShow(p):setTimeout(wppaOvlShowPrev,200),!1}function wppaOvlShowNext(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var p=wppaOvlCurIdx+1;p>wppaOvlUrls.length-1&&(p=0);var a=document.getElementById("wppa-pre-next");return""!=wppaOvlVideoHtmls[p]||wppaIsIe||a.complete||!wppaOvlOpen?wppaOvlShow(p):setTimeout(wppaOvlShowNext,200),!1}function wppaOvlShowSame(){var p,a;wppaOvlOpen&&(p=wppaOvlCurIdx,a=wppaOvlRunning,wppaOvlHide(!0),jQuery("#wppa-ovl-spin").show(),setTimeout(function(){wppaOvlShow(p),a&&setTimeout(wppaOvlStartStop(),wppaOvlSlideSpeed)},1e3))}function wppaOvlHide(p){var a=jQuery;wppaOvlOpen=!1,wppaOvlClosing=!wppaOvlClosing,wppaStopAudio(),p||"lightbox"!=wppaFsPolicy||wppaIsFs()&&wppaFsOff(),a("#wppa-overlay-ic").html("").hide(),a("#wppa-overlay-pc").html("").hide(),a("#wppa-overlay-fpc").html("").hide(),a("#wppa-overlay-zpc").html("").hide(),a(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,clearTimeout(wppaOvlTimer),a("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,a("body").trigger("quitimage"),document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),a(window).trigger("wppalightboxend"),a(window).trigger("resize"),wppaOvlClosing&&wppaIsMobile?setTimeout(function(){wppaOvlHide(p)},250):(wppaOvlClosing=!1,p||setTimeout(function(){a("#wppa-overlay-bg").hide(),a("#wppa-ovl-spin").hide()},500))}function wppaOvlOnclick(p){switch(wppaOvlOnclickType){case"none":break;case"close":wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;48<p.clientY&&(a<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}return!0}function wppaInitOverlay(){var e=jQuery;e(".wp-caption").each(function(){var p=e(this),a=p.find("IMG[alt]").attr("alt")||"",t=p.find(".wp-caption-text").html()||"",p=p.find("a"),t=a+"<br>"+t;p.attr("data-lbtitle")||p.attr("data-lbtitle",t)});var p,a,t=e("a"),l=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=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<t.length;a++)if(p=t[a],e(p).attr("data-rel")?l=e(p).attr("data-rel").split("["):p.rel?l=p.rel.split("["):l[0]="","wppa"==l[0])switch(wppaWppaOverlayActivated=!0,e(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaMagnifierCursor){case"pointer":e(p).css("cursor","pointer");break;case"":e(p).css("cursor","default");break;default:e(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}e(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaAdjustControlbar)}function wppaOvlResize(){0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout(wppaOvlStartAudio,100))}function wppaOvlImgClick(p){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(p.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var p="";return wppaOvlIsSingle||(p+='<span id="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:block;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-start-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"none":"block")+';" title="Start" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Play-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-stop-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"block":"none")+';" title="Stop" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Pause-Button",wppaOvlIconSize,!0,!0)+"</span>",p+='<span id="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:block;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>"),p+='<span id="wppa-exit-btn-2" style="margin:0 2px;float:right;display:block;" title="Exit" onclick="wppaOvlHide()" >'+wppaSvgHtml("Exit-2",wppaOvlIconSize,!0,!0)+"</span>","lightbox"!=wppaFsPolicy||wppaIsSafari||wppaIsIpad||(p+='<span id="wppa-fulls-btn-2" class="wppa-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen-2",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-exit-fulls-btn-2" class="wppa-exit-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen-2",wppaOvlIconSize,!0,!0)+"</span>"),p}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).on("resize",function(){wppaOvlResize()});
11
  // wppa-popup
12
  var wppaJsPopupVersion="7.5.03";function wppaPopUp(p,t,e,r,i,a,o,n,d,s){var c,l,u,w,m,g,y,h,x,f,b,v=jQuery("#wppa-thumb-area-"+p).width();if(document.getElementById("x-"+e+"-"+p)){var j=(r?'<div id="wppa-name-'+p+'" style="display:none; padding:1px;" class="wppa_pu_info">'+r+"</div>":"")+(i?'<div id="wppa-desc-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+i+"</div>":"")+(a?'<div id="wppa-rat-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+a+"</div>":"")+(o?'<div id="wppa-ncom-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+o+"</div>":""),k="";switch(wppaThumbTargetBlank&&(k='target="_blank"'),wppaPopupLinkType){case"none":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;case"fullpopup":b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" onclick="'+wppaPopupOnclick[e]+'" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>");break;default:t.onclick?(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;">'+b+j+"</div>"),document.getElementById("wppa-img-"+p).onclick=t.onclick):(b=""!=n?n:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+'; text-align:center;"><a id="wppa-a" href="'+document.getElementById("x-"+e+"-"+p).href+'" '+k+' style="line-height:1px;" >'+b+"</a>"+j+"</div>"))}}f=document.getElementById("wppa-img-"+p),y=parseInt(d),m=parseInt(s),f&&jQuery(".wppa_pu_info").css("width",(m<y?y:m)-8+"px"),w=parseInt(t.offsetLeft)-7-5-1,l=parseInt(t.offsetTop)-7-1,jQuery("#grid-item-"+p+"-"+e).length&&(w+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("left"))+6,l+=parseInt(jQuery("#grid-item-"+p+"-"+e).css("top"))),h=parseInt(t.clientWidth),g=parseInt(t.clientHeight),x=m<y?y:m,(u=w-parseInt((x-h)/2))<0&&(u=0),v<u+y+16&&(u=v-y-16),(c=l-parseInt((m-g)/2))<0&&(c=0);var I=parseInt((x-y)/2);jQuery("#wppa-img-"+p).css({maxWidth:y+"px"}),jQuery("#wppa-popup-"+p).css({marginLeft:w+"px",marginTop:l+"px"}),jQuery("#wppa-img-"+p).css({marginLeft:0,marginRight:0,width:h+"px",height:g+"px"}),jQuery("#wppa-popup-"+p).stop().animate({marginLeft:u+"px",marginTop:c+"px"},400),jQuery("#wppa-img-"+p).stop().animate({marginLeft:I+"px",marginRight:I+"px",width:y+"px",height:m+"px"},400),setTimeout("wppaPopReady( "+p+" )",400)}function wppaPopReady(p){jQuery("#wppa-name-"+p).show(),jQuery("#wppa-desc-"+p).show(),jQuery("#wppa-rat-"+p).show(),jQuery("#wppa-ncom-"+p).show(),wppaProtect()}function wppaPopDown(p){jQuery("#wppa-popup-"+p).html("")}function wppaFullPopUp(p,t,e,r,i){var a=i+50,o=r+14,n="",d="",s=document.getElementById("i-"+t+"-"+p);s&&(n=s.alt,d=s.title);var c,l=".pdf"==e.substr(e.length-4,e.length),u=window.open("","Print","width="+o+", height="+a+", location=no, resizable=no, menubar=yes ");u.document.write("<html>"),u.document.write("<head>"),u.document.write('<style type="text/css">body{margin:0; padding:6px; background-color:'+wppaBackgroundColorImage+"; text-align:center;}</style>"),u.document.write("<title>"+n+"</title>"),u.document.write('<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js" ><\/script><script type="text/javascript">function wppa_downl() {jQuery.ajax( { \turl: \t\t\''+wppaAjaxUrl+"',data: \t\t'action=wppa&wppa-action=makeorigname&photo-id="+t+"&from=popup',async: \ttrue,type: \t\t'GET',timeout: \t10000,beforeSend:\tfunction( xhr ) {},success: \t\tfunction( result, status, xhr ) {result = result.split( \"||\" );if ( result[1] == \"0\" ) {window.open( result[2] );return true;}else {alert( \"Error: \"+result[1]+\" \"+result[2] );return false;}},error: \t\tfunction( xhr, status, error ) {wppaConsoleLog( 'wppaFullPopUp failed. Error = ' + error + ', status = ' + status, 'force' );},} );}<\/script>"),u.document.write('<script type="text/javascript">function wppa_print() {document.getElementById( "wppa_printer" ).style.visibility="hidden"; document.getElementById( "wppa_download" ).style.visibility="hidden"; window.print();}<\/script>'),u.document.write("</head>"),u.document.write("<body>"),u.document.write('<div style="width:'+r+'px;">'),l?u.document.write('<iframe src="'+e+'" style="padding-bottom:6px;width:100%;height:'+(a-60)+'px;" ></iframe><br />'):u.document.write('<img src="'+e+'" style="padding-bottom:6px;" /><br />'),u.document.write('<div style="text-align:center">'+d+"</div>"),l||(c=r-66,u.document.write('<img src="'+wppaImageDirectory+'download.png" id="wppa_download" title="Download" style="position:absolute; top:6px; left:'+c+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_downl();" />'),c=r-30,u.document.write('<img src="'+wppaImageDirectory+'printer.png" id="wppa_printer" title="Print" style="position:absolute; top:6px; left:'+c+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_print();" />')),u.document.write("</div>"),u.document.write("</body>"),u.document.write("</html>"),wppaProtect()}
13
  // wppa-touch
14
  var wppaJsTouchVersion="7.5.03",wppaTriggerElementID=null,wppaFingerCount=0,wppaStartX=0,wppaStartY=0,wppaCurX=0,wppaCurY=0,wppaDeltaX=0,wppaDeltaY=0,wppaHorzDiff=0,wppaVertDiff=0,wppaMinLength=72,wppaSwipeLength=0,wppaSwipeAngle=null,wppaSwipeDirection=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=0,wppaMobileTimeStart=0;function wppaStartTime(){var p=(new Date).getTime();return wppaMobileTimeStart=p,!0}function wppaInTime(){return(new Date).getTime()-wppaMobileTimeStart<250}function wppaTapLink(p,e){wppaInTime()&&(_bumpClickCount(p),document.location.href=e)}function wppaTouchStart(p,e,a){-1==(wppaSwipeMocc=a)&&(wppaSwipeOnLightbox=!0,p.preventDefault()),1==(wppaFingerCount=p.touches.length)?(wppaStartX=p.touches[0].pageX,wppaStartY=p.touches[0].pageY,wppaTriggerElementID=e):wppaTouchCancel()}function wppaTouchMove(p){wppaSwipeOnLightbox&&p.preventDefault(),1==p.touches.length?(wppaCurX=p.touches[0].pageX,wppaCurY=p.touches[0].pageY):wppaTouchCancel()}function wppaTouchEnd(p){wppaSwipeOnLightbox&&p.preventDefault(),1==wppaFingerCount&&0!=wppaCurX&&(wppaSwipeLength=Math.round(Math.sqrt(Math.pow(wppaCurX-wppaStartX,2)+Math.pow(wppaCurY-wppaStartY,2))),wppaMinLength<=wppaSwipeLength&&(wppaCalculateAngle(),wppaDetermineSwipeDirection(),wppaProcessingRoutine())),wppaTouchCancel()}function wppaTouchCancel(){wppaTriggerElementID=wppaSwipeDirection=wppaSwipeAngle=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=wppaSwipeLength=wppaVertDiff=wppaHorzDiff=wppaDeltaY=wppaDeltaX=wppaCurY=wppaCurX=wppaStartY=wppaStartX=wppaFingerCount=0}function wppaCalculateAngle(){var p=wppaStartX-wppaCurX,e=wppaCurY-wppaStartY,a=(Math.round(Math.sqrt(Math.pow(p,2)+Math.pow(e,2))),Math.atan2(e,p));(wppaSwipeAngle=Math.round(180*a/Math.PI))<0&&(wppaSwipeAngle=360-Math.abs(wppaSwipeAngle))}function wppaDetermineSwipeDirection(){wppaSwipeDirection=wppaSwipeAngle<=45&&0<=wppaSwipeAngle||wppaSwipeAngle<=360&&315<=wppaSwipeAngle?"left":135<=wppaSwipeAngle&&wppaSwipeAngle<=225?"right":45<wppaSwipeAngle&&wppaSwipeAngle<135?"down":"up"}function wppaProcessingRoutine(){document.getElementById(wppaTriggerElementID);if(wppaSwipeOnLightbox)"left"==wppaSwipeDirection?wppaOvlShowNext():"right"==wppaSwipeDirection&&wppaOvlShowPrev();else{if("right"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]-1,idx<0){if(!wppaSlideWrap)return;idx=_wppaSlides[wppaSwipeMocc].length-1}wppaGotoKeepState(wppaSwipeMocc,idx)}if("left"==wppaSwipeDirection){if(idx=_wppaCurIdx[wppaSwipeMocc]+1,idx==_wppaSlides[wppaSwipeMocc].length){if(!wppaSlideWrap)return;idx=0}wppaGotoKeepState(wppaSwipeMocc,idx)}}wppaTouchCancel()}
15
  // wppa-zoom
16
+ var wppaJsZoomVersion="8.0.00.016";function wppaDoZoomPan(o,t){var m=jQuery;t&&(wppaZoomData[o]=t);var n=l(o);if(!n.initialized&&!n.abort){if(n.isLightbox&&(m("#wppa-ovl-spin").show(),m("#wppa-ovl-zoom-container").hide()),!n.image.complete)return wppaConsoleLog("Loading image "+o),void setTimeout(function(){wppaDoZoomPan(o)},200);wppaConsoleLog("Loading image "+o+" complete"),m(image).css({width:image.naturalWidth,height:image.naturalHeight,maxWidth:image.naturalWidth,maxHeight:image.naturalHeight}),n.manual=!1,n.deltaX=0,n.deltaY=0,n.deltaFactor=1,n.busy=!1,n.div=m("#wppa-pan-div-"+n.itemId),n.canvas=document.getElementById("wppa-pan-canvas-"+n.itemId),n.left=m("#wppa-pctl-left-"+n.itemId),n.right=m("#wppa-pctl-right-"+n.itemId),n.up=m("#wppa-pctl-up-"+n.itemId),n.down=m("#wppa-pctl-down-"+n.itemId),n.zoomin=m("#wppa-pctl-zoomin-"+n.itemId),n.zoomout=m("#wppa-pctl-zoomout-"+n.itemId),n.prev=m("#wppa-pctl-prev-"+n.itemId),n.next=m("#wppa-pctl-next-"+n.itemId),n.exit=m("#wppa-exit-btn-2"),n.canvasWidth=n.width,n.canvasHeight=n.height,n.savedCanvasX=0,n.savedCanvasY=0,n.fromHeight=n.image.height,n.fromWidth=n.image.width,n.imageRatio=n.image.width/n.image.height,n.fromX=0,n.fromY=0,n.centerX=n.fromX+n.fromWidth/2,n.centerY=n.fromY+n.fromHeight/2,n.ctx=null,n.buttondown=!1,n.enableManual=!0,n.ctrlbarUpdate=!0,n.pause=!1,n.time=0,n.right.on("touchstart",function(t){e(o)}),n.right.on("touchend",function(t){h(o)}),n.left.on("touchstart",function(t){i(o)}),n.left.on("touchend",function(t){h(o)}),n.up.on("touchstart",function(t){s(o)}),n.up.on("touchend",function(t){h(o)}),n.down.on("touchstart",function(t){r(o)}),n.down.on("touchend",function(t){h(o)}),n.zoomin.on("touchstart",function(t){c(o)}),n.zoomin.on("touchend",function(t){h(o)}),n.zoomout.on("touchstart",function(t){u(o)}),n.zoomout.on("touchend",function(t){h(o)}),n.canvas&&(n.canvas.addEventListener("touchstart",function(t){f(o,t)}),n.canvas.addEventListener("touchmove",function(t){w(o,t)}),n.canvas.addEventListener("touchend",function(t){g(o)})),n.canvas&&(n.canvas.addEventListener("mousedown",function(t){f(o,t)}),n.canvas.addEventListener("mousemove",function(t){w(o,t)}),n.canvas.addEventListener("mouseup",function(t){g(o)}),n.canvas.addEventListener("mouseleave",function(t){(n=l(o)).manual&&l(o,{pause:!0})}),n.canvas.addEventListener("mouseenter",function(t){var a;l(a=o,{pause:!1}).manual&&p(a)}),document.getElementById("wppa-pan-canvas-"+n.itemId).addEventListener("wheel",function(t){var a;a=o,(t=t).preventDefault(),t.stopPropagation(),n=l(a),l(a,{deltaFactor:1+t.deltaY*n.zoomsensitivity/(wppaIsChrome?1e4:1e3),manual:!1,burrondown:!1}),p(a),setTimeout(function(){l(a,{deltaFactor:1})},25)})),n.right.on("mousedown",function(t){e(o)}),n.right.on("mouseup",function(t){h(o)}),n.left.on("mousedown",function(t){i(o)}),n.left.on("mouseup",function(t){h(o)}),n.up.on("mousedown",function(t){s(o)}),n.up.on("mouseup",function(t){h(o)}),n.down.on("mousedown",function(t){r(o)}),n.down.on("mouseup",function(t){h(o)}),n.zoomin.off("mousedown"),n.zoomin.on("mousedown",function(t){c(o)}),n.zoomin.off("mouseup"),n.zoomin.on("mouseup",function(t){h(o)}),n.zoomout.on("mousedown",function(t){u(o)}),n.zoomout.on("mouseup",function(t){h(o)}),n.isLightbox&&(m("body").on("quitimage",function(t){var a;a=o,wppaConsoleLog("Zoom Quit Image"),n=l(a,{abort:!0}),m(n.canvas).hide(),m("#wppa-pctl-div-"+n.itemId).hide(),m("#wppa-ovl-zoom-container").hide()}),m("#wppa-pctl-div-"+n.itemId).on("click",function(t){wppaKillEvent(t)})),n.isLightbox?(m(window).off("resize",wppaOvlShowSame),m(window).on("resize",wppaOvlShowSame)):m(window).on("resize",function(t){a(o)}),a(o),n.initialized=!0,l(o,n),m("#wppa-ovl-spin").hide(),wppaProtect()}function p(t){var a,o,n,e,i,s=l(t);s.canvas&&(z()<s.time+10?wppaConsoleLog("Skipped render "+t):(l(t,{time:z()}),(s.isLightbox&&!wppaOvlOpen||!s.isLightbox&&wppaOvlOpen)&&(s=l(0,{abort:!0})),s.abort?l(t,{manual:!1,buttondown:!1,pause:!1,ctx:null}):s.busy||(wppaDebugCounter++,wppaConsoleLog("Render zoom "+t+" "+wppaDebugCounter),(s=l(t,{busy:!0})).manual||(s.fromX+=s.deltaX,s.fromY+=s.deltaY,a=s.fromHeight/s.deltaFactor,o=s.fromWidth/s.deltaFactor,50<a&&1!=s.deltaFactor&&(wppaIsFs()||a<=s.image.height)?(s.fromX-=(o-s.fromWidth)/2,s.fromY-=(a-s.fromHeight)/2,s.fromWidth=o,s.fromHeight=a):s.buttondown=!1),s.fromX=Math.max(0,Math.min(s.image.width-s.fromWidth,s.fromX)),s.fromY=Math.max(0,Math.min(s.image.height-s.fromHeight,s.fromY)),n=screen.width/screen.height,e=(1-s.image.width/s.fromWidth)*s.canvas.width/2,i=(1-s.image.height/s.fromHeight)*s.canvas.height/2,s.ctx=s.canvas.getContext("2d"),n>s.imageRatio&&a>s.image.height&&wppaIsFs()||n<=s.imageRatio&&o>s.image.width&&wppaIsFs()?(s.enableManual=!1,s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height),s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,e,i,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"default"})):(s.enableManual=!0,s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,0,0,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"grab"})),wppaIsFs()?(s.fsMaskTop=i-(s.canvas.height-screen.height)/2,s.fsMaskLeft=e-(s.canvas.width-screen.width)/2,s.fsMaskBottom=screen.height-s.fsMaskTop,s.fsMaskRight=screen.width-s.fsMaskLeft):(s.fsMaskTop=0,s.fsMaskLeft=0,s.fsMaskBottom=0,s.fsMaskRight=0),s.ctrlbarUpdate&&(wppaAdjustControlbar(),s.ctrlbarUpdate=!1),s.busy=!1,wppaIsElementInViewport(s.canvas)||(s.buttondown=!1),l(t,s),s.pause||!s.manual&&!s.buttondown||setTimeout(function(){p(t)},10),s.pause&&l(t,{pause:!1}))))}function a(t){var a,o,n,e,i,s,r,c,d,u=l(t);u&&(u.isLightbox?(m("#wppa-overlay-zpc").css("display",""),e=(o=!wppaIsFs())?(n=window.innerWidth||screen.width,window.innerHeight||screen.height):(n=screen.width,screen.height),r=0,d=(c=8)+(u.controls?u.icsize+10:0)+10,o?(c+=2*u.borderWidth,d+=2*u.borderWidth):c=40,a=o?e-d>(n-c)/u.imageRatio:(screenRatio=screen.width/screen.height,screenRatio<u.imageRatio),o&&a&&(r=(e-(s=(i=n-c)/u.imageRatio)-d)/2+20),o&&!a&&(s=(i=u.imageRatio*(e-(u.controls?u.icsize:0)-48))/u.imageRatio,r=20),!o&&a&&(i=(s=screen.height)*u.imageRatio,r=0),o||a||(s=(i=screen.width)/u.imageRatio,r=(screen.height-s)/2),m("#wppa-ovl-zoom-container").css({top:r}),m("#wppa-overlay-zpc").css({top:0,left:0}),u.canvasWidth=i,u.canvasHeight=s,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight,o?(m("#wppa-ovl-zoom-container").css({backgroundColor:u.backgroundColor,padding:u.padding,borderRadius:u.borderRadius+"px",borderWidth:u.borderWidth+"px",width:i,marginLeft:0}),a?m("#wppa-overlay-zpc").css({left:4}):m("#wppa-overlay-zpc").css({left:(n-i)/2})):(m("#wppa-overlay-zpc").css({marginLeft:0}),m("#wppa-ovl-zoom-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",borderWidth:"0px",width:i,left:(n-i)/2,position:"fixed"}))):(u.canvasWidth=m(u.div).parent().width(),u.canvasHeight=u.canvasWidth/u.imageRatio,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight),u.ctrlbarUpdate=!0,l(t,u),setTimeout(function(){p(t)},250),m("#wppa-ovl-zoom-container").show())}function e(t){var a=l(t),a=a.image.naturalWidth/a.canvas.width;a<1.5&&(a=1.5),l(t,{deltaX:a*=1.5,buttondown:!0,manual:!1}),p(t)}function i(t){var a=l(t),a=a.image.naturalWidth/a.canvas.width;a<1.5&&(a=1.5),l(t,{deltaX:-(a*=1.5),buttondown:!0,manual:!1}),p(t)}function s(t){var a=l(t),a=a.image.naturalHeight/a.canvas.height;a<1.5&&(a=1.5),l(t,{deltaY:-(a*=1.5),buttondown:!0,manual:!1}),p(t)}function r(t){var a=l(t),a=a.image.naturalHeight/a.canvas.height;a<1.5&&(a=1.5),l(t,{deltaY:a*=1.5,buttondown:!0,manual:!1}),p(t)}function c(t){l(t,{deltaFactor:1.005,buttondown:!0,manual:!1}),p(t)}function u(t){l(t,{deltaFactor:.995,buttondown:!0,manual:!1}),p(t)}function h(t){l(t,{deltaX:0,deltaY:0,deltaFactor:1,buttondown:!1})}function f(t,a){var o=l(t),n=v(a).X,e=v(a).Y;if(wppaIsFs()&&o.isLightbox&&(n<o.fsMaskLeft||n>o.fsMaskRight||e<o.fsMaskTop||e>o.fsMaskBottom))return l(0,{abort:!0}),void jQuery("#wppa-overlay-bg").trigger("click");o.enableManual&&(l(t,{manual:!0,savedCanvasX:n=b(t,a).X,savedCanvasY:e=b(t,a).Y,buttondown:!1}),p(t))}function w(t,a){var o,n=l(t),e=b(t,a).X,i=b(t,a).Y;n.manual&&(o=n.canvas.width/n.fromWidth,a=(n.savedCanvasX-e)/o+n.fromX,o=(n.savedCanvasY-i)/o+n.fromY,0<a&&0<o&&a+n.fromWidth<n.image.width&&o+n.fromHeight<n.image.height&&l(t,{fromX:a,fromY:o,savedCanvasX:e,savedCanvasY:i}))}function g(t){l(t,{manual:!1})}function l(t,a){if(!wppaZoomData[t])return!1;if(a)for(var o in a)wppaZoomData[t][o]=a[o];return wppaZoomData[t]}function v(t){var a;return t=t.touches?(a=t.touches[0].screenX,t.touches[0].screenY):(a=t.screenX,t.screenY),{X:a,Y:t}}function b(t,a){var o;return a=a.touches?(t=l(t),o=a.touches[0].screenX-t.fsMaskLeft,a.touches[0].screenY-t.fsMaskTop):(o=a.offsetX,a.offsetY),{X:o,Y:a}}function z(){return d=new Date,d.getTime()}}
17
  // wppa-spheric
18
+ var wppaJsSphericVersion="8.0.00.016";function wppaDoSphericPan(t,e){var c=jQuery;e&&(wppaSphericData[t]=e);var s=f(t,s);if(!s.initialized&&!s.abort&&(!s.isLightbox||wppaOvlOpen)){if(!s.isLightbox&&!wppaIsElementInViewport(c("#wppa-pan-div-"+t)))return setTimeout(function(){wppaDoSphericPan(t)},1e3),void f(t,{vtime:b()});s.wppaRenderer&&(s.wppaRenderer.state.reset(),s.wppaSphere.dispose(),s.wppaSphereMaterial.dispose(),s.texture.dispose()),s.isLightbox&&wppaOvlOpen&&(c("#wppa-ovl-spin").show(),c("#wppa-overlay-ic").html("")),s.manCtrl=!1,s.butDown=!1,s.lon=180,s.lat=0,s.dFov=0,s.abort=!1,s.aspect=2,s.div=c("#wppa-pan-div-"+t),s.left=c("#wppa-pctl-left-"+t),s.right=c("#wppa-pctl-right-"+t),s.up=c("#wppa-pctl-up-"+t),s.down=c("#wppa-pctl-down-"+t),s.zoomin=c("#wppa-pctl-zoomin-"+t),s.zoomout=c("#wppa-pctl-zoomout-"+t),s.prev=c("#wppa-pctl-prev-"+t),s.next=c("#wppa-pctl-next-"+t),s.pause=!1,s.mFakt=wppaIsMobile?"2":"1",s.time=0,s.isLightbox&&(wppaGlobalOvlPanoramaId++,s.uId=wppaGlobalOvlPanoramaId),c(s.div).html(""),s.wppaRenderer||(s.wppaRenderer=new THREE.WebGLRenderer),s.wppaRenderer.setSize(s.width,s.height),c(s.div).append(s.wppaRenderer.domElement),s.wppaScene=new THREE.Scene,s.wppaSphere=new THREE.SphereGeometry(100,100,40),s.wppaSphere.applyMatrix4((new THREE.Matrix4).makeScale(-1,1,1)),s.texture=(new THREE.TextureLoader).load(s.url),s.wppaSphereMaterial=new THREE.MeshBasicMaterial({map:s.texture}),s.wppaSphereMesh=new THREE.Mesh(s.wppaSphere,s.wppaSphereMaterial),s.wppaScene.add(s.wppaSphereMesh),s.right.on("touchstart",function(e){u(t)}),s.right.on("touchend",function(e){v(t)}),s.left.on("touchstart",function(e){l(t)}),s.left.on("touchend",function(e){v(t)}),s.up.on("touchstart",function(e){h(t)}),s.up.on("touchend",function(e){v(t)}),s.down.on("touchstart",function(e){m(t)}),s.down.on("touchend",function(e){v(t)}),s.zoomin.on("touchstart",function(e){i(t)}),s.zoomin.on("touchend",function(e){v(t)}),s.zoomout.on("touchstart",function(e){r(t)}),s.zoomout.on("touchend",function(e){v(t)}),s.enableManual&&0<c("#wppa-pan-div-"+t+" canvas").length&&(c("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchstart",function(e){a(t,e)}),c("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchmove",function(e){o(t,e)}),c("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchend",function(e){p(t)})),s.right.on("mousedown",function(e){u(t)}),s.right.on("mouseup",function(e){v(t)}),s.left.on("mousedown",function(e){l(t)}),s.left.on("mouseup",function(e){v(t)}),s.up.on("mousedown",function(e){h(t)}),s.up.on("mouseup",function(e){v(t)}),s.down.on("mousedown",function(e){m(t)}),s.down.on("mouseup",function(e){v(t)}),s.zoomin.off("mousedown"),s.zoomin.on("mousedown",function(e){i(t)}),s.zoomin.off("mouseup"),s.zoomin.on("mouseup",function(e){v(t)}),s.zoomout.on("mousedown",function(e){r(t)}),s.zoomout.on("mouseup",function(e){v(t)}),s.enableManual&&0<c("#wppa-pan-div-"+t+" canvas").length&&(c("#wppa-pan-div-"+t+" canvas").on("mousedown",function(e){a(t,e)}),c("#wppa-pan-div-"+t+" canvas").on("mousemove",function(e){o(t,e)}),c("#wppa-pan-div-"+t+" canvas").on("mouseup",function(e){p(t)}),c("#wppa-pan-div-"+t+" canvas")[0].addEventListener("wheel",function(e){var n;n=t,(e=e).preventDefault(),e.stopPropagation(),s=f(n),f(n,{manCtrl:!1,butDown:!1,autorun:!1,dX:0,dFov:-e.deltaY*s.zoomsensitivity/(wppaIsChrome?60:6)}),w(n),setTimeout(function(){f(n,{dFov:0})},25)})),s.isLightbox&&(c("body").on("quitimage",function(e){var n;s=f(n=t,{abort:!0,autorun:!1}),clearTimeout(s.timer),clearInterval(s.intervalTimer),c("#wppa-pan-div-"+n+" canvas").hide(),c("#wppa-pctl-div-"+n).hide(),c("#wppa-overlay-pc").hide()}),c("#wppa-pctl-div-"+t).on("click",function(e){wppaKillEvent(e)})),f(t,s),c(window).on("wpparesizeend",function(e){n(t)}),wppaProtect(),c(document).on("tabbychange",function(e){var n;n=t,s.wppaRenderer.state.reset(),s=f(n,{initialized:!1,abort:!0}),setTimeout(function(){f(n,{abort:!1}),wppaDoSphericPan(n)},200),wppaConsoleLog("(setTimeout) redo spheric after tabbychange mocc="+n)}),n(t),s.intervalTimer=setInterval(function(){n(t)},1e3)}function w(e){wppaConsoleLog("spheric render called","force");var n=f(e),t=wppaIsElementInViewport(c("#wppa-pan-div-"+e+" canvas"));if(n.manCtrl||!(b()<n.time+25)){if(!t)return!(b()<n.vtime+1e3)&&(setTimeout(function(){w(e)},1e3),void f(e,{vtime:b()}));f(e,{time:b()}),n.isLightbox&&(!wppaOvlOpen||wppaOvlActivePanorama!=n.id||wppaGlobalOvlPanoramaId>n.uId)&&(abort=!0),n.abort||((n.butDown||n.manCtrl)&&n.autorun&&(n.autorun=!1,n.dX=0),0==n.dX&&0==n.dY&&0==n.dFov&&(n.pause=!0),n.butDown&&(n.pause=!1),n.fov+=n.dFov,n.fov=Math.max(20,Math.min(120,n.fov)),n.wppaCamera=new THREE.PerspectiveCamera(n.fov,n.aspect,1,1e3),n.wppaCamera.target=new THREE.Vector3(0,0,0),n.lon+=n.dX,n.lat+=n.dY,n.lat=Math.max(-85,Math.min(85,n.lat)),n.wppaCamera.target.x=500*Math.sin(THREE.Math.degToRad(90-n.lat))*Math.cos(THREE.Math.degToRad(n.lon)),n.wppaCamera.target.y=500*Math.cos(THREE.Math.degToRad(90-n.lat)),n.wppaCamera.target.z=500*Math.sin(THREE.Math.degToRad(90-n.lat))*Math.sin(THREE.Math.degToRad(n.lon)),n.wppaCamera.lookAt(n.wppaCamera.target),n.wppaRenderer&&n.wppaRenderer.render(n.wppaScene,n.wppaCamera),wppaAdjustControlbar(),c("#wppa-ovl-spin").hide(),n.manCtrl,(n.autorun||!n.pause&&(n.manCtrl||n.butDown))&&n.wppaRenderer&&(n.timer=setTimeout(function(){w(e)},25)),f(e,n))}}function n(e){var n=!wppaIsFs();if(s=f(e)){if(s.isLightbox){if(!wppaOvlOpen)return;c("#wppa-overlay-pc").show(),c("#wppa-overlay-pc").css("width","");var t,a,o=(n=!wppaIsFs())?(a=window.innerWidth||screen.width,window.innerHeight||screen.height):(a=screen.width,screen.height),p=8,i=8+(s.controls?s.icsize+10:0)+30;n&&(p+=2*s.borderWidth,i+=2*s.borderWidth),t=(a-p)/2+i<o,i=n?t?(o-(u=(r=a-p)/2)-i)/2+20:(r=2*(u=o-i),20):(r=screen.width,u=screen.height,0),s.aspect=r/u,c("#wppa-ovl-sphericpan-container").css({top:i}),c("#wppa-overlay-pc").css({top:0}),n?(c("#wppa-ovl-sphericpan-container").css({backgroundColor:s.backgroundColor,padding:s.padding+"px",borderRadius:s.borderRadius+"px",width:r}),t?c("#wppa-overlay-pc").css({left:4}):c("#wppa-overlay-pc").css({left:(a-r)/2})):c("#wppa-ovl-sphericpan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",width:r,left:(a-r)/2}),s.wppaRenderer.setSize(r,u)}else{var r=c(s.div).parent().width(),u=parseInt(r/2);if(!s.wppaRenderer)return;s.wppaRenderer.setSize(r,u)}s.width=r,s.height=u,f(e,s),s.timer=setTimeout(function(){w(e)},250)}}function a(e,n){n.preventDefault(),n.stopPropagation(),s=f(e,{manCtrl:!0,butDown:!1,autorun:!1,dX:0}),n.touches?f(e,{sX:n.touches[0].clientX,sY:n.touches[0].clientY}):f(e,{sX:n.clientX,sY:n.clientY}),f(e,{sLon:s.lon,sLat:s.lat}),w(e)}function o(e,n){n.preventDefault(),n.stopPropagation(),(s=f(e)).manCtrl&&(n.touches?f(e,{lon:.1*(s.sX-n.touches[0].clientX)+s.sLon,lat:.1*(n.touches[0].clientY-s.sY)+s.sLat,pause:!1}):f(e,{lon:.1*(s.sX-n.clientX)+s.sLon,lat:.1*(n.clientY-s.sY)+s.sLat,pause:!1}),w(e))}function p(e){f(e,{manCtrl:!1})}function i(e){s=f(e),f(e,{dFov:-.4*s.mFakt,butDown:!0}),w(e)}function r(e){s=f(e),f(e,{dFov:.4*s.mFakt,butDown:!0}),w(e)}function u(e){s=f(e),f(e,{dX:.2*s.mFakt,butDown:!0}),w(e)}function l(e){s=f(e),f(e,{dX:-.2*s.mFakt,butDown:!0}),w(e)}function h(e){s=f(e),f(e,{dY:.2*s.mFakt,butDown:!0}),w(e)}function m(e){s=f(e),f(e,{dY:-.2*s.mFakt,butDown:!0}),w(e)}function v(e){s=f(e),f(e,{dX:0,dY:0,dFov:0,butDown:!1})}function f(e,n){if(!wppaSphericData[e])return!1;if(n)for(var t in n)wppaSphericData[e][t]=n[t];return wppaSphericData[e]}function b(){return d=new Date,d.getTime()}}
js/wppa-lightbox.js CHANGED
@@ -4,7 +4,7 @@
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
  //
7
- var wppaJsLightboxVersion = '8.0.00.015';
8
 
9
  // Global inits
10
  var wppaIsVideo = false;
@@ -21,9 +21,11 @@ var wppaOvlGlobal = false;
21
  var wppaWppaOverlayActivated = false;
22
  var wppaOvlTimer = 0;
23
 
 
 
24
  // Global size specs
25
  var wppaSavedContainerWidth = 0;
26
- var wppaSavedContainerHeight;
27
  var wppaSavedMarginLeft;
28
  var wppaSavedMarginTop;
29
  var wppaSavedImageWidth;
@@ -103,8 +105,8 @@ function wppaOvlShow( arg ) {
103
  // Panorama requires image container top=0 left=0
104
  // Non panorama: 50%
105
  if ( wppaOvlActivePanorama > 0 ) {
106
- wppaSavedContainerWidth = 100; // reset
107
- wppaSavedContainerHeight = 100;
108
  }
109
 
110
  // Make sure background is present
@@ -195,13 +197,14 @@ function wppaOvlShow( arg ) {
195
  wppaOvlVideoNaturalWidths[j] = $( anchor ).attr( 'data-videonatwidth' ) ? $( anchor ).attr( 'data-videonatwidth' ) : '';
196
  wppaOvlVideoNaturalHeights[j] = $( anchor ).attr( 'data-videonatheight' ) ? $( anchor ).attr( 'data-videonatheight' ) : '';
197
  panData = $( anchor ).attr( 'data-panorama' ) ? $( anchor ).attr( 'data-panorama' ) : '';
 
198
 
199
  if ( panData.length > 0 ) {
200
  wppaOvlHasPanoramas = true;
201
  dotPos = panData.indexOf( '.' );
202
  wppaOvlPanoramaHtml[j] = panData.substr(dotPos+1);
203
  wppaOvlPanoramaIds[j] = panData.substr(0,dotPos);
204
- wppaOvlTypes[j] = 'panorama';
205
  }
206
  else {
207
  wppaOvlPanoramaHtml[j] = '';
@@ -244,13 +247,14 @@ function wppaOvlShow( arg ) {
244
  wppaOvlVideoNaturalWidths[0] = $( arg ).attr( 'data-videonatwidth' ) ? $( arg ).attr( 'data-videonatwidth' ) : '';
245
  wppaOvlVideoNaturalHeights[0] = $( arg ).attr( 'data-videonatheight' ) ? $( arg ).attr( 'data-videonatheight' ) : '';
246
  panData = $( arg ).attr( 'data-panorama' ) ? $( arg ).attr( 'data-panorama' ) : '';
 
247
 
248
  if ( panData.length > 0 ) {
249
  wppaOvlHasPanoramas = true;
250
  dotPos = panData.indexOf( '.' );
251
  wppaOvlPanoramaHtml[0] = panData.substr(dotPos+1);
252
  wppaOvlPanoramaIds[0] = panData.substr(0,dotPos);
253
- wppaOvlTypes[0] = 'panorama';
254
  }
255
  else {
256
  wppaOvlPanoramaHtml[0] = '';
@@ -285,7 +289,11 @@ function _wppaOvlShow( idx ) {
285
 
286
  var $ = jQuery;
287
 
288
- $( '#wppa-overlay-pc' ).html( '' );
 
 
 
 
289
 
290
  // Globalize index
291
  wppaOvlCurIdx = idx;
@@ -320,13 +328,13 @@ function _wppaOvlShow( idx ) {
320
  var prev = ( wppaOvlIdx == 0 ? ( wppaOvlUrls.length - 1 ) : wppaOvlIdx - 1 );
321
 
322
  // Preload next, only if not video and not panorama
323
- if ( wppaOvlTypes[next] != 'panorama' && wppaOvlVideoHtmls[next] == '' && wppaOvlOpen ) {
324
  document.getElementById( 'wppa-pre-next' ).src = wppaOvlUrls[next]; // Preload
325
  wppaConsoleLog( 'Preloading next ' + wppaOvlUrls[next] + ' index = ' + next );
326
  }
327
 
328
  // Preload previous, only if not video
329
- if ( wppaOvlTypes[prev] != 'panorama' && wppaOvlVideoHtmls[prev] == '' && wppaOvlOpen ) {
330
  document.getElementById( 'wppa-pre-prev' ).src = wppaOvlUrls[prev]; // Preload
331
  wppaConsoleLog( 'Preloading previous ' + wppaOvlUrls[prev] + ' index = ' + prev);
332
  }
@@ -441,13 +449,23 @@ function _wppaOvlShow( idx ) {
441
  if ( ( ! wppaIsVideo && ! wppaHasAudio ) || wppaOvlFsPhotoId != wppaPhotoId || wppaPhotoId == 0 ) {
442
  wppaStopVideo( 0 );
443
  wppaStopAudio();
444
- if ( wppaOvlActivePanorama == 0 ) {
445
- $( '#wppa-overlay-ic' ).html( html );
446
- $( '#wppa-overlay-pc' ).html( '' );
 
 
 
 
 
 
 
 
 
 
 
447
  }
448
  else {
449
- $( '#wppa-overlay-pc' ).html( html );
450
- $( '#wppa-overlay-ic' ).html( '' );
451
  }
452
  }
453
 
@@ -469,6 +487,11 @@ function _wppaOvlShow( idx ) {
469
  }
470
  wppaOvlFirst = false;
471
 
 
 
 
 
 
472
  // Update buttons
473
  wppaFsShow();
474
 
@@ -562,8 +585,8 @@ function _wppaOvlShow( idx ) {
562
  'border-width:' + wppaOvlBorderWidth + 'px ' + wppaOvlBorderWidth + 'px 0;' +
563
  'border-style:solid;' +
564
  'border-color:'+wppaOvlTheme+';' +
565
- 'width:' + wppaSavedImageWidth + 'px;' +
566
- 'height:' + wppaSavedImageHeight + 'px;' +
567
  'box-shadow:none;' +
568
  'box-sizing:content-box;' +
569
  'position:relative;' +
@@ -694,6 +717,11 @@ function _wppaOvlShow( idx ) {
694
  // $( '#wppa-overlay-ic' ).html( '' );
695
  }
696
 
 
 
 
 
 
697
  // Restore opacity of fs and exit buttons
698
  wppaFsShow();
699
 
@@ -1126,16 +1154,11 @@ function wppaOvlHide(keepState) {
1126
  }
1127
  }
1128
 
1129
- // setTimeout( function(){
1130
- // Clear image container
1131
- $( '#wppa-overlay-ic' ).html( '' );
1132
- // $( '#wppa-overlay-ic' ).hide();
1133
- $( '#wppa-overlay-pc' ).html( '' );
1134
- // $( '#wppa-overlay-pc' ).hide();
1135
-
1136
- // // Remove background optionally
1137
- // if ( ! keepState ) $( '#wppa-overlay-bg' ).hide();
1138
- // }, 200 );
1139
 
1140
  // Remove kb handler
1141
  $( document ).off( 'keydown', wppaOvlKeyboardHandler );
4
  // Dependancies: wppa.js and default wp jQuery library
5
  //
6
  //
7
+ var wppaJsLightboxVersion = '8.0.00.016';
8
 
9
  // Global inits
10
  var wppaIsVideo = false;
21
  var wppaWppaOverlayActivated = false;
22
  var wppaOvlTimer = 0;
23
 
24
+ var panType;
25
+
26
  // Global size specs
27
  var wppaSavedContainerWidth = 0;
28
+ var wppaSavedContainerHeight = 0;
29
  var wppaSavedMarginLeft;
30
  var wppaSavedMarginTop;
31
  var wppaSavedImageWidth;
105
  // Panorama requires image container top=0 left=0
106
  // Non panorama: 50%
107
  if ( wppaOvlActivePanorama > 0 ) {
108
+ // wppaSavedContainerWidth = 0; // reset
109
+ // wppaSavedContainerHeight = 0;
110
  }
111
 
112
  // Make sure background is present
197
  wppaOvlVideoNaturalWidths[j] = $( anchor ).attr( 'data-videonatwidth' ) ? $( anchor ).attr( 'data-videonatwidth' ) : '';
198
  wppaOvlVideoNaturalHeights[j] = $( anchor ).attr( 'data-videonatheight' ) ? $( anchor ).attr( 'data-videonatheight' ) : '';
199
  panData = $( anchor ).attr( 'data-panorama' ) ? $( anchor ).attr( 'data-panorama' ) : '';
200
+ panType = $( anchor ).attr( 'data-pantype' ) ? $( anchor ).attr( 'data-pantype' ) : '';
201
 
202
  if ( panData.length > 0 ) {
203
  wppaOvlHasPanoramas = true;
204
  dotPos = panData.indexOf( '.' );
205
  wppaOvlPanoramaHtml[j] = panData.substr(dotPos+1);
206
  wppaOvlPanoramaIds[j] = panData.substr(0,dotPos);
207
+ wppaOvlTypes[j] = panType;
208
  }
209
  else {
210
  wppaOvlPanoramaHtml[j] = '';
247
  wppaOvlVideoNaturalWidths[0] = $( arg ).attr( 'data-videonatwidth' ) ? $( arg ).attr( 'data-videonatwidth' ) : '';
248
  wppaOvlVideoNaturalHeights[0] = $( arg ).attr( 'data-videonatheight' ) ? $( arg ).attr( 'data-videonatheight' ) : '';
249
  panData = $( arg ).attr( 'data-panorama' ) ? $( arg ).attr( 'data-panorama' ) : '';
250
+ panType = $( arg ).attr( 'data-pantype' ) ? $( arg ).attr( 'data-pantype' ) : '';
251
 
252
  if ( panData.length > 0 ) {
253
  wppaOvlHasPanoramas = true;
254
  dotPos = panData.indexOf( '.' );
255
  wppaOvlPanoramaHtml[0] = panData.substr(dotPos+1);
256
  wppaOvlPanoramaIds[0] = panData.substr(0,dotPos);
257
+ wppaOvlTypes[0] = panType;
258
  }
259
  else {
260
  wppaOvlPanoramaHtml[0] = '';
289
 
290
  var $ = jQuery;
291
 
292
+ // Clear image containers
293
+ $( '#wppa-overlay-ic' ).html( '' ).hide();
294
+ $( '#wppa-overlay-pc' ).html( '' ).hide();
295
+ $( '#wppa-overlay-fpc' ).html( '' ).hide();
296
+ $( '#wppa-overlay-zpc' ).html( '' ).hide();
297
 
298
  // Globalize index
299
  wppaOvlCurIdx = idx;
328
  var prev = ( wppaOvlIdx == 0 ? ( wppaOvlUrls.length - 1 ) : wppaOvlIdx - 1 );
329
 
330
  // Preload next, only if not video and not panorama
331
+ if ( wppaOvlTypes[next] == '' && wppaOvlVideoHtmls[next] == '' && wppaOvlOpen ) {
332
  document.getElementById( 'wppa-pre-next' ).src = wppaOvlUrls[next]; // Preload
333
  wppaConsoleLog( 'Preloading next ' + wppaOvlUrls[next] + ' index = ' + next );
334
  }
335
 
336
  // Preload previous, only if not video
337
+ if ( wppaOvlTypes[prev] == '' && wppaOvlVideoHtmls[prev] == '' && wppaOvlOpen ) {
338
  document.getElementById( 'wppa-pre-prev' ).src = wppaOvlUrls[prev]; // Preload
339
  wppaConsoleLog( 'Preloading previous ' + wppaOvlUrls[prev] + ' index = ' + prev);
340
  }
449
  if ( ( ! wppaIsVideo && ! wppaHasAudio ) || wppaOvlFsPhotoId != wppaPhotoId || wppaPhotoId == 0 ) {
450
  wppaStopVideo( 0 );
451
  wppaStopAudio();
452
+
453
+ // Fill the right image container
454
+ if ( wppaOvlActivePanorama > 0) {
455
+ switch( wppaOvlTypes[idx] ) {
456
+ case 'spheric':
457
+ $( '#wppa-overlay-pc' ).html( html ).show();
458
+ break;
459
+ case 'flat':
460
+ $( '#wppa-overlay-fpc' ).html( html ).show();
461
+ break;
462
+ case 'zoom':
463
+ $( '#wppa-overlay-zpc' ).html( html ).show();
464
+ break;
465
+ }
466
  }
467
  else {
468
+ $( '#wppa-overlay-ic' ).html( html ).show();
 
469
  }
470
  }
471
 
487
  }
488
  wppaOvlFirst = false;
489
 
490
+ // Show
491
+ if ( wppaOvlTypes[idx] == '' ) {
492
+ $("#wppa-overlay-ic").show();
493
+ }
494
+
495
  // Update buttons
496
  wppaFsShow();
497
 
585
  'border-width:' + wppaOvlBorderWidth + 'px ' + wppaOvlBorderWidth + 'px 0;' +
586
  'border-style:solid;' +
587
  'border-color:'+wppaOvlTheme+';' +
588
+ // 'width:' + wppaSavedImageWidth + 'px;' +
589
+ // 'height:' + wppaSavedImageHeight + 'px;' +
590
  'box-shadow:none;' +
591
  'box-sizing:content-box;' +
592
  'position:relative;' +
717
  // $( '#wppa-overlay-ic' ).html( '' );
718
  }
719
 
720
+ // Show
721
+ if ( wppaOvlTypes[idx] == '' || wppaOvlTypes[idx] == 'document' ) {
722
+ $("#wppa-overlay-ic").show();
723
+ }
724
+
725
  // Restore opacity of fs and exit buttons
726
  wppaFsShow();
727
 
1154
  }
1155
  }
1156
 
1157
+ // Clear image container
1158
+ $( '#wppa-overlay-ic' ).html( '' ).hide();
1159
+ $( '#wppa-overlay-pc' ).html( '' ).hide();
1160
+ $( '#wppa-overlay-fpc' ).html( '' ).hide();
1161
+ $( '#wppa-overlay-zpc' ).html( '' ).hide();
 
 
 
 
 
1162
 
1163
  // Remove kb handler
1164
  $( document ).off( 'keydown', wppaOvlKeyboardHandler );
js/wppa-lightbox.min.js CHANGED
@@ -1 +1 @@
1
- var wppaSavedContainerHeight,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaJsLightboxVersion="8.0.00.015",wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaOvlGlobal=!1,wppaWppaOverlayActivated=!1,wppaOvlTimer=0,wppaSavedContainerWidth=0;function wppaOvlKeyboardHandler(a){var p,t=(p=(null==a?event:a).keyCode,27),a=String.fromCharCode(p).toLowerCase();switch(p){case t:wppaStopVideo(0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(a){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"f":wppaFsOn();break;case"q":case"x":wppaStopVideo(0),wppaOvlHide()}return!1}function wppaOvlShow(a){var p,t,e=jQuery;if(0<wppaOvlActivePanorama&&(wppaSavedContainerHeight=wppaSavedContainerWidth=100),e("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaOvlFirst&&(e("#weaver-final").removeClass("wvr-hide-bang"),wppaKbHandlerInstalled||(e(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),e(window).trigger("wppalightboxstart")),"object"==typeof a){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlTypes=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var l=(a.rel||!!e(a).attr("data-rel")&&e(a).attr("data-rel")).split("[");if(l[1])for(var o,i=l[1],n=e("a"),w=0,r=0;r<n.length;r++)1<(l=!!e(o=n[r]).attr("data-rel")&&e(o).attr("data-rel").split("[")).length&&"wppa"==l[0]&&l[1]==i&&(wppaOvlUrls[w]=o.href,e(o).attr("data-lbtitle")?wppaOvlTitles[w]=wppaRepairScriptTags(e(o).attr("data-lbtitle")):wppaOvlTitles[w]=wppaRepairScriptTags(o.title),wppaOvlIds[w]=e(o).attr("data-id")?e(o).attr("data-id"):"0",wppaOvlAlts[w]=e(o).attr("data-alt")?e(o).attr("data-alt"):"",wppaOvlVideoHtmls[w]=e(o).attr("data-videohtml")?decodeURI(e(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[w]=e(o).attr("data-pdfhtml")?decodeURI(e(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[w]=e(o).attr("data-audiohtml")?decodeURI(e(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[w]=e(o).attr("data-videonatwidth")?e(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[w]=e(o).attr("data-videonatheight")?e(o).attr("data-videonatheight"):"",0<(p=e(o).attr("data-panorama")?e(o).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[w]=p.substr(t+1),wppaOvlPanoramaIds[w]=p.substr(0,t),wppaOvlTypes[w]="panorama"):(wppaOvlPanoramaHtml[w]="",wppaOvlPanoramaIds[w]=0,wppaOvlTypes[w]=""),0<wppaOvlPdfHtmls[w].length&&(wppaOvlTypes[w]="document"),decodeURI(e(o).attr("data-pdfhtml"))==decodeURI(e(a).attr("data-pdfhtml"))&&decodeURI(e(o).attr("data-videohtml"))==decodeURI(e(a).attr("data-videohtml"))&&decodeURI(e(o).attr("data-audiohtml"))==decodeURI(e(a).attr("data-audiohtml"))&&o.href==a.href&&(wppaOvlIdx=w),w++);else wppaOvlUrls[0]=a.href,e(a).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(e(a).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(a.title),wppaOvlIds[0]=e(a).attr("data-id")?e(a).attr("data-id"):"0",wppaOvlAlts[0]=e(a).attr("data-alt")?e(a).attr("data-alt"):"",wppaOvlVideoHtmls[0]=e(a).attr("data-videohtml")?decodeURI(e(a).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=e(a).attr("data-audiohtml")?decodeURI(e(a).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=e(a).attr("data-pdfhtml")?decodeURI(e(a).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=e(a).attr("data-videonatwidth")?e(a).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=e(a).attr("data-videonatheight")?e(a).attr("data-videonatheight"):"",0<(p=e(a).attr("data-panorama")?e(a).attr("data-panorama"):"").length?(wppaOvlHasPanoramas=!0,t=p.indexOf("."),wppaOvlPanoramaHtml[0]=p.substr(t+1),wppaOvlPanoramaIds[0]=p.substr(0,t),wppaOvlTypes[0]="panorama"):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0,wppaOvlTypes[0]=""),0<wppaOvlPdfHtmls[0].length&&(wppaOvlTypes[0]="document"),wppaOvlIdx=0}else wppaOvlIdx=a;wppaOvlOpen=!0,e("body").trigger("quitimage"),setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(a){var p=jQuery;p("#wppa-overlay-pc").html(""),wppaOvlCurIdx=a,wppaOvlFirst&&p("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[a],wppaHasAudio=""!=wppaOvlAudioHtmls[a],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[a];var t=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1;if("panorama"!=wppaOvlTypes[t]&&""==wppaOvlVideoHtmls[t]&&wppaOvlOpen&&(document.getElementById("wppa-pre-next").src=wppaOvlUrls[t],wppaConsoleLog("Preloading next "+wppaOvlUrls[t]+" index = "+t)),"panorama"!=wppaOvlTypes[e]&&""==wppaOvlVideoHtmls[e]&&wppaOvlOpen&&(document.getElementById("wppa-pre-prev").src=wppaOvlUrls[e],wppaConsoleLog("Preloading previous "+wppaOvlUrls[e]+" index = "+e)),_bumpViewCount(wppaOvlIds[a]),wppaOvlIsSingle=1==wppaOvlUrls.length,wppaOvlActivePanorama=wppaOvlPanoramaIds[a],wppaOvlActivePanorama,wppaIsFs()||wppaOvlActivePanorama)return wppaOvlActivePanorama?l=wppaOvlPanoramaHtml[a]:wppaIsVideo?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><video id="wppa-overlay-img" controls preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video></div>":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[a]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" ></iframe></div>':(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[a]+'" />',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[a]+"</audio>"),l+="</div>"),(wppaIsVideo||wppaHasAudio)&&wppaOvlFsPhotoId==wppaPhotoId&&0!=wppaPhotoId||(wppaStopVideo(0),wppaStopAudio(),0==wppaOvlActivePanorama?(p("#wppa-overlay-ic").html(l),p("#wppa-overlay-pc").html("")):(p("#wppa-overlay-pc").html(l),p("#wppa-overlay-ic").html(""))),0<wppaOvlPanoramaIds[a]&&wppaOvlIsSingle&&p(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout(wppaOvlFormatFull,10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,wppaFsShow(),wppaProtect(),!1;wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);t="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(t=wppaOvlFontColor);wppaOvlUrls.length;0==wppaOvlActivePanorama&&p("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" >'+wppaOvlVideoHtmls[a]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[a]+' id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" ></iframe>':(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[a]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[a]+'" />',wppaHasAudio&&(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[a]+"</audio>"),wppaOvlIsVideo=!1),l+="</div>";e=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+t+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >',l+=wppaOvlNavBar(),l+=(e?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[a],l+="</div>",l+="</div>",(0==wppaOvlActivePanorama?p("#wppa-overlay-ic"):p("#wppa-overlay-pc")).html(l),wppaFsShow(),p("#wppa-overlay-img").bind("contextmenu",function(a){return!1}),0==wppaOvlPanoramaIds[a]&&wppaOvlResize(),wppaFsShow(),wppaAdjustControlbar(),!1}function wppaOvlSize(a){var p=jQuery;if(!wppaOvlActivePanorama){var t=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(t&&e&&"none"!=p("#wppa-overlay-bg").css("display")){if(!wppaIsFs()){var l,o=wppaWindowWidth(),i=wppaWindowHeight(),n=wppaOvlIsVideo?(t.clientWidth,l=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),l=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t.clientWidth,l=t.naturalWidth,t.naturalHeight);void 0===l&&(l=t.clientWidth,n=t.clientHeight),(t=(e=(o-3*wppaOvlBorderWidth)/l)<(t=i/n)?e:t)<1&&(l=parseInt(l*t),n=parseInt(n*t));var t=p("#wppa-overlay-txt").height(),t="auto"==wppaOvlTxtHeight?(0==t&&(t=20+2*wppaOvlBorderWidth),i-t-20-2*wppaOvlBorderWidth):i-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,i=parseInt(t*l/n),i=(wppaOvlPadTop,parseInt((o-i)/2),i);n<t&&(wppaOvlPadTop,parseInt((o-l)/2),i=l);o=wppaSavedImageWidth-i<3&&i-wppaSavedImageWidth<3;return i<=10&&(n=180,o=!(l=i=240)),i=parseInt(i),wppaSavedImageWidth=parseInt(i),wppaSavedImageHeight=parseInt(i*n/l),wppaSavedMarginLeft=-parseInt(i/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(i+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+p("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),p("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},a),p("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},a),o?(p("#wppa-ovl-spin").hide(),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},a+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){var a,p=jQuery;if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){if(wppaOvlIsVideo)a=document.getElementById("wppa-overlay-img"),o=wppaOvlVideoNaturalWidths[wppaOvlIdx],i=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)a=document.getElementById("wppa-overlay-img"),o=screen.width,i=screen.height;else{if(a=document.getElementById("wppa-overlay-img"),!(wppaIsIe||a&&a.complete))return void setTimeout(wppaOvlFormatFull,200);o=a.naturalWidth,i=a.naturalHeight}var t=o/i,e=0,l=0,o=0,i=0,i=t<screen.width/screen.height?(e=(screen.width-screen.height*t)/2,l=0,o=screen.height,screen.height*t):(e=0,l=(screen.height-screen.width/t)/2,o=screen.width/t,screen.width),e=parseInt(e),l=parseInt(l),o=parseInt(o);return i=parseInt(i),p(a).css({height:o,width:i,marginLeft:e,marginTop:l,left:0,top:0,maxWidth:1e4}),p(a).css({visibility:"visible"}),p("#wppa-ovl-full-bg").css({overflow:"hidden"}),p("#wppa-ovl-full-bg").scrollTop(0),p("#wppa-ovl-full-bg").scrollLeft(0),p("#wppa-ovl-spin").hide(),p("#wppa-ovl-full-bg").css({visibility:"hidden"}),html=p("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",p("#wppa-overlay-ic").html(html),wppaFsShow(),!0}}function wppaOvlStartAudio(){var a=document.getElementById("wppa-overlay-audio");a&&"function"==typeof a.play&&a.play()}function wppaOvlStartStop(){var a=jQuery;wppaOvlRunning?(wppaOvlRunning=!1,-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&a("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&a("#wppa-ovl-next-btn").css("visibility","visible")),a("#wppa-ovl-stop-btn").hide(),a("#wppa-ovl-start-btn").show()):(wppaOvlRunning=!0,wppaOvlRun(),a("#wppa-ovl-stop-btn").show(),a("#wppa-ovl-start-btn").hide())}function wppaOvlRun(){if(wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout(wppaOvlRun,50);else{if(!wppaIsVideo){var a=document.getElementById("wppa-overlay-img");if(a&&!wppaIsIe&&!a.complete)return void setTimeout(wppaOvlRun,200)}wppaOvlShowNext(),wppaOvlTimer=setTimeout(wppaOvlRun,wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx-1;a<0&&(a=wppaOvlUrls.length-1);var p=document.getElementById("wppa-pre-prev");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowPrev,200),!1}function wppaOvlShowNext(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var a=wppaOvlCurIdx+1;a>wppaOvlUrls.length-1&&(a=0);var p=document.getElementById("wppa-pre-next");return""!=wppaOvlVideoHtmls[a]||wppaIsIe||p.complete||!wppaOvlOpen?wppaOvlShow(a):setTimeout(wppaOvlShowNext,200),!1}function wppaOvlShowSame(){var a,p;wppaOvlOpen&&(a=wppaOvlCurIdx,p=wppaOvlRunning,wppaOvlHide(!0),jQuery("#wppa-ovl-spin").show(),setTimeout(function(){wppaOvlShow(a),p&&setTimeout(wppaOvlStartStop(),wppaOvlSlideSpeed)},1e3))}function wppaOvlHide(a){var p=jQuery;wppaOvlOpen=!1,wppaOvlClosing=!wppaOvlClosing,wppaStopAudio(),a||"lightbox"!=wppaFsPolicy||wppaIsFs()&&wppaFsOff(),p("#wppa-overlay-ic").html(""),p("#wppa-overlay-pc").html(""),p(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,clearTimeout(wppaOvlTimer),p("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,p("body").trigger("quitimage"),document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),p(window).trigger("wppalightboxend"),p(window).trigger("resize"),wppaOvlClosing&&wppaIsMobile?setTimeout(function(){wppaOvlHide(a)},250):(wppaOvlClosing=!1,a||setTimeout(function(){p("#wppa-overlay-bg").hide(),p("#wppa-ovl-spin").hide()},500))}function wppaOvlOnclick(a){switch(wppaOvlOnclickType){case"none":break;case"close":wppaOvlHide();break;case"browse":var p=a.screenX-window.screenX;48<a.clientY&&(p<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}return!0}function wppaInitOverlay(){var e=jQuery;e(".wp-caption").each(function(){var a=e(this),p=a.find("IMG[alt]").attr("alt")||"",t=a.find(".wp-caption-text").html()||"",a=a.find("a"),t=p+"<br>"+t;a.attr("data-lbtitle")||a.attr("data-lbtitle",t)});var a,p,t=e("a"),l=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=0)==wppaSavedContainerWidth&&(wppaSavedContainerWidth=240+2*wppaOvlBorderWidth,wppaSavedContainerHeight=180+3*wppaOvlBorderWidth+20+("auto"==wppaOvlTxtHeight?50:wppaOvlTxtHeight),wppaSavedMarginLeft=-(120+wppaOvlBorderWidth),wppaSavedMarginTop=-(90+wppaOvlBorderWidth+10+("auto"==wppaOvlTxtHeight?25:wppaOvlTxtHeight/2)),wppaSavedImageWidth=240,wppaSavedImageHeight=180+wppaOvlBorderWidth),p=0;p<t.length;p++)if(a=t[p],e(a).attr("data-rel")?l=e(a).attr("data-rel").split("["):a.rel?l=a.rel.split("["):l[0]="","wppa"==l[0])switch(wppaWppaOverlayActivated=!0,e(a).on("click",function(a){wppaOvlShow(this),a.preventDefault()}),wppaMagnifierCursor){case"pointer":e(a).css("cursor","pointer");break;case"":e(a).css("cursor","default");break;default:e(a).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}e(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaAdjustControlbar)}function wppaOvlResize(){0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout(wppaOvlStartAudio,100))}function wppaOvlImgClick(a){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(a.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var a="";return wppaOvlIsSingle||(a+='<span id="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:block;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-start-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"none":"block")+';" title="Start" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Play-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-stop-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"block":"none")+';" title="Stop" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Pause-Button",wppaOvlIconSize,!0,!0)+"</span>",a+='<span id="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:block;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>"),a+='<span id="wppa-exit-btn-2" style="margin:0 2px;float:right;display:block;" title="Exit" onclick="wppaOvlHide()" >'+wppaSvgHtml("Exit-2",wppaOvlIconSize,!0,!0)+"</span>","lightbox"!=wppaFsPolicy||wppaIsSafari||wppaIsIpad||(a+='<span id="wppa-fulls-btn-2" class="wppa-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen-2",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-exit-fulls-btn-2" class="wppa-exit-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen-2",wppaOvlIconSize,!0,!0)+"</span>"),a}jQuery(document).ready(function(a){wppaInitOverlay()}),jQuery(window).on("resize",function(){wppaOvlResize()});
1
+ var panType,wppaSavedMarginLeft,wppaSavedMarginTop,wppaSavedImageWidth,wppaSavedImageHeight,wppaJsLightboxVersion="8.0.00.016",wppaIsVideo=!1,wppaHasAudio=!1,wppaOvlIsPdf=!1,wppaOvlImgs=[],wppaKbHandlerInstalled=!1,wppaOvlCurIdx=0,wppaOvlSvgInverse=!1,wppaOvlHasPanoramas=!1,wppaGlobalOvlPanoramaId=0,wppaOvlBrowseOnClick=!1,wppaOvlGlobal=!1,wppaWppaOverlayActivated=!1,wppaOvlTimer=0,wppaSavedContainerWidth=0,wppaSavedContainerHeight=0;function wppaOvlKeyboardHandler(p){var a,t=(a=(null==p?event:p).keyCode,27),p=String.fromCharCode(a).toLowerCase();switch(a){case t:wppaStopVideo(0),wppaOvlHide();break;case 37:wppaOvlShowPrev();break;case 39:wppaOvlShowNext()}switch(p){case"p":wppaOvlShowPrev();break;case"n":wppaOvlShowNext();break;case"s":wppaOvlStartStop();break;case"f":wppaFsOn();break;case"q":case"x":wppaStopVideo(0),wppaOvlHide()}return!1}function wppaOvlShow(p){var a,t,e=jQuery;if(wppaOvlActivePanorama,e("#wppa-overlay-bg").stop().fadeTo(3,wppaOvlOpacity),wppaOvlFirst&&(e("#weaver-final").removeClass("wvr-hide-bang"),wppaKbHandlerInstalled||(e(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),e(window).trigger("wppalightboxstart")),"object"==typeof p){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlTypes=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!(wppaOvlImgs=[]);var l=(p.rel||!!e(p).attr("data-rel")&&e(p).attr("data-rel")).split("[");if(l[1])for(var o,i=l[1],w=e("a"),n=0,r=0;r<w.length;r++)1<(l=!!e(o=w[r]).attr("data-rel")&&e(o).attr("data-rel").split("[")).length&&"wppa"==l[0]&&l[1]==i&&(wppaOvlUrls[n]=o.href,e(o).attr("data-lbtitle")?wppaOvlTitles[n]=wppaRepairScriptTags(e(o).attr("data-lbtitle")):wppaOvlTitles[n]=wppaRepairScriptTags(o.title),wppaOvlIds[n]=e(o).attr("data-id")?e(o).attr("data-id"):"0",wppaOvlAlts[n]=e(o).attr("data-alt")?e(o).attr("data-alt"):"",wppaOvlVideoHtmls[n]=e(o).attr("data-videohtml")?decodeURI(e(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[n]=e(o).attr("data-pdfhtml")?decodeURI(e(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[n]=e(o).attr("data-audiohtml")?decodeURI(e(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[n]=e(o).attr("data-videonatwidth")?e(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[n]=e(o).attr("data-videonatheight")?e(o).attr("data-videonatheight"):"",a=e(o).attr("data-panorama")?e(o).attr("data-panorama"):"",panType=e(o).attr("data-pantype")?e(o).attr("data-pantype"):"",0<a.length?(wppaOvlHasPanoramas=!0,t=a.indexOf("."),wppaOvlPanoramaHtml[n]=a.substr(t+1),wppaOvlPanoramaIds[n]=a.substr(0,t),wppaOvlTypes[n]=panType):(wppaOvlPanoramaHtml[n]="",wppaOvlPanoramaIds[n]=0,wppaOvlTypes[n]=""),0<wppaOvlPdfHtmls[n].length&&(wppaOvlTypes[n]="document"),decodeURI(e(o).attr("data-pdfhtml"))==decodeURI(e(p).attr("data-pdfhtml"))&&decodeURI(e(o).attr("data-videohtml"))==decodeURI(e(p).attr("data-videohtml"))&&decodeURI(e(o).attr("data-audiohtml"))==decodeURI(e(p).attr("data-audiohtml"))&&o.href==p.href&&(wppaOvlIdx=n),n++);else wppaOvlUrls[0]=p.href,e(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(e(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlIds[0]=e(p).attr("data-id")?e(p).attr("data-id"):"0",wppaOvlAlts[0]=e(p).attr("data-alt")?e(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=e(p).attr("data-videohtml")?decodeURI(e(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=e(p).attr("data-audiohtml")?decodeURI(e(p).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=e(p).attr("data-pdfhtml")?decodeURI(e(p).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=e(p).attr("data-videonatwidth")?e(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=e(p).attr("data-videonatheight")?e(p).attr("data-videonatheight"):"",a=e(p).attr("data-panorama")?e(p).attr("data-panorama"):"",panType=e(p).attr("data-pantype")?e(p).attr("data-pantype"):"",0<a.length?(wppaOvlHasPanoramas=!0,t=a.indexOf("."),wppaOvlPanoramaHtml[0]=a.substr(t+1),wppaOvlPanoramaIds[0]=a.substr(0,t),wppaOvlTypes[0]=panType):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0,wppaOvlTypes[0]=""),0<wppaOvlPdfHtmls[0].length&&(wppaOvlTypes[0]="document"),wppaOvlIdx=0}else wppaOvlIdx=p;wppaOvlOpen=!0,e("body").trigger("quitimage"),setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(p){var a=jQuery;a("#wppa-overlay-ic").html("").hide(),a("#wppa-overlay-pc").html("").hide(),a("#wppa-overlay-fpc").html("").hide(),a("#wppa-overlay-zpc").html("").hide(),wppaOvlCurIdx=p,wppaOvlFirst&&a("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[p];var t=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1;if(""==wppaOvlTypes[t]&&""==wppaOvlVideoHtmls[t]&&wppaOvlOpen&&(document.getElementById("wppa-pre-next").src=wppaOvlUrls[t],wppaConsoleLog("Preloading next "+wppaOvlUrls[t]+" index = "+t)),""==wppaOvlTypes[e]&&""==wppaOvlVideoHtmls[e]&&wppaOvlOpen&&(document.getElementById("wppa-pre-prev").src=wppaOvlUrls[e],wppaConsoleLog("Preloading previous "+wppaOvlUrls[e]+" index = "+e)),_bumpViewCount(wppaOvlIds[p]),wppaOvlIsSingle=1==wppaOvlUrls.length,wppaOvlActivePanorama=wppaOvlPanoramaIds[p],wppaOvlActivePanorama,wppaIsFs()||wppaOvlActivePanorama){if(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 );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video></div>":wppaOvlIsPdf?l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><iframe id="wppa-overlay-img" '+wppaOvlPdfHtmls[p]+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" ></iframe></div>':(l='<div id="wppa-ovl-full-bg" style="position:fixed; width:'+screen.width+"px; height:"+screen.height+'px; left:0px; top:0px; text-align:center;" ><img id="wppa-overlay-img" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[p]+'" style="border:none; width:'+screen.width+'px; visibility:hidden; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata"'+(wppaOvlAudioStart?" autoplay":"")+' onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;left:0px;bottom:0px;padding:0;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),l+="</div>"),!wppaIsVideo&&!wppaHasAudio||wppaOvlFsPhotoId!=wppaPhotoId||0==wppaPhotoId)if(wppaStopVideo(0),wppaStopAudio(),0<wppaOvlActivePanorama)switch(wppaOvlTypes[p]){case"spheric":a("#wppa-overlay-pc").html(l).show();break;case"flat":a("#wppa-overlay-fpc").html(l).show();break;case"zoom":a("#wppa-overlay-zpc").html(l).show()}else a("#wppa-overlay-ic").html(l).show();return 0<wppaOvlPanoramaIds[p]&&wppaOvlIsSingle&&a(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout(wppaOvlFormatFull,10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,wppaOvlFirst=!1,""==wppaOvlTypes[p]&&a("#wppa-overlay-ic").show(),wppaFsShow(),wppaProtect(),!1}wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);t="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(t=wppaOvlFontColor);wppaOvlUrls.length;0==wppaOvlActivePanorama&&a("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var l="";l+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(l+='<video id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' onpause="wppaOvlVideoPlaying = false;" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video>",wppaOvlIsVideo=!0):wppaOvlIsPdf?l+="<iframe "+wppaOvlPdfHtmls[p]+' id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" ></iframe>':(l+='<img id="wppa-overlay-img" onmouseover="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0.8);" onmouseout="jQuery(\'.wppa-ovl-nav-btn\').stop().fadeTo(200,0);" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" src="'+wppaOvlUrls[p]+'" style="border-width:'+wppaOvlBorderWidth+"px "+wppaOvlBorderWidth+"px 0;border-style:solid;border-color:"+wppaOvlTheme+";width:"+wppaSavedImageWidth+"px;height:"+wppaSavedImageHeight+"px;box-shadow:none;box-sizing:content-box;position:relative;border-top-left-radius:"+wppaOvlRadius+"px;border-top-right-radius:"+wppaOvlRadius+'px;margin:0;padding:0;" alt="'+wppaOvlAlts[p]+'" />',wppaHasAudio&&(l+='<audio id="wppa-overlay-audio" class="wppa-overlay-audio" data-from="wppa" preload="metadata" onpause="wppaOvlAudioPlaying = false;" onplay="wppaOvlAudioPlaying = true;" style="width:100%;position:absolute;box-shadow:none;left:0;bottom:0;padding:0 '+wppaOvlBorderWidth+'px;margin:0;background-color:transparent;box-sizing:border-box;" controls >'+wppaOvlAudioHtmls[p]+"</audio>"),wppaOvlIsVideo=!1),l+="</div>";e=!wppaOvlIsSingle&&wppaOvlShowCounter;return l+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+t+";text-align:center;font-family:"+wppaOvlFontFamily+";font-size:"+wppaOvlFontSize+"px;font-weight:"+wppaOvlFontWeight+";line-height:"+wppaOvlLineHeight+"px;box-shadow:none;border-bottom-left-radius:"+wppaOvlRadius+"px;border-bottom-right-radius:"+wppaOvlRadius+'px;" ><div id="wppa-overlay-txt" style="text-align:center;min-height:36px;width:100%;'+("auto"==wppaOvlTxtHeight?"max-height:200px;":"max-height:"+wppaOvlTxtHeight+"px;")+'overflow:auto;box-shadow:none;" >',l+=wppaOvlNavBar(),l+=(e?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p],l+="</div>",l+="</div>",(0==wppaOvlActivePanorama?a("#wppa-overlay-ic"):a("#wppa-overlay-pc")).html(l),""!=wppaOvlTypes[p]&&"document"!=wppaOvlTypes[p]||a("#wppa-overlay-ic").show(),wppaFsShow(),a("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),0==wppaOvlPanoramaIds[p]&&wppaOvlResize(),wppaFsShow(),wppaAdjustControlbar(),!1}function wppaOvlSize(p){var a=jQuery;if(!wppaOvlActivePanorama){var t=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(t&&e&&"none"!=a("#wppa-overlay-bg").css("display")){if(!wppaIsFs()){var l,o=wppaWindowWidth(),i=wppaWindowHeight(),w=wppaOvlIsVideo?(t.clientWidth,l=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),l=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(t.clientWidth,l=t.naturalWidth,t.naturalHeight);void 0===l&&(l=t.clientWidth,w=t.clientHeight),(t=(e=(o-3*wppaOvlBorderWidth)/l)<(t=i/w)?e:t)<1&&(l=parseInt(l*t),w=parseInt(w*t));var t=a("#wppa-overlay-txt").height(),t="auto"==wppaOvlTxtHeight?(0==t&&(t=20+2*wppaOvlBorderWidth),i-t-20-2*wppaOvlBorderWidth):i-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,i=parseInt(t*l/w),i=(wppaOvlPadTop,parseInt((o-i)/2),i);w<t&&(wppaOvlPadTop,parseInt((o-l)/2),i=l);o=wppaSavedImageWidth-i<3&&i-wppaSavedImageWidth<3;return i<=10&&(w=180,o=!(l=i=240)),i=parseInt(i),wppaSavedImageWidth=parseInt(i),wppaSavedImageHeight=parseInt(i*w/l),wppaSavedMarginLeft=-parseInt(i/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(i+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+a("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),a("#wppa-overlay-img").stop().animate({width:wppaSavedImageWidth,height:wppaSavedImageHeight},p),a("#wppa-overlay-ic").stop().animate({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p),o?(a("#wppa-ovl-spin").hide(),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){var p,a=jQuery;if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){if(wppaOvlIsVideo)p=document.getElementById("wppa-overlay-img"),o=wppaOvlVideoNaturalWidths[wppaOvlIdx],i=wppaOvlVideoNaturalHeights[wppaOvlIdx];else if(wppaOvlIsPdf)p=document.getElementById("wppa-overlay-img"),o=screen.width,i=screen.height;else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout(wppaOvlFormatFull,200);o=p.naturalWidth,i=p.naturalHeight}var t=o/i,e=0,l=0,o=0,i=0,i=t<screen.width/screen.height?(e=(screen.width-screen.height*t)/2,l=0,o=screen.height,screen.height*t):(e=0,l=(screen.height-screen.width/t)/2,o=screen.width/t,screen.width),e=parseInt(e),l=parseInt(l),o=parseInt(o);return i=parseInt(i),a(p).css({height:o,width:i,marginLeft:e,marginTop:l,left:0,top:0,maxWidth:1e4}),a(p).css({visibility:"visible"}),a("#wppa-ovl-full-bg").css({overflow:"hidden"}),a("#wppa-ovl-full-bg").scrollTop(0),a("#wppa-ovl-full-bg").scrollLeft(0),a("#wppa-ovl-spin").hide(),a("#wppa-ovl-full-bg").css({visibility:"hidden"}),html=a("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",a("#wppa-overlay-ic").html(html),wppaFsShow(),!0}}function wppaOvlStartAudio(){var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&p.play()}function wppaOvlStartStop(){var p=jQuery;wppaOvlRunning?(wppaOvlRunning=!1,-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&p("#wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&p("#wppa-ovl-next-btn").css("visibility","visible")),p("#wppa-ovl-stop-btn").hide(),p("#wppa-ovl-start-btn").show()):(wppaOvlRunning=!0,wppaOvlRun(),p("#wppa-ovl-stop-btn").show(),p("#wppa-ovl-start-btn").hide())}function wppaOvlRun(){if(wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout(wppaOvlRun,50);else{if(!wppaIsVideo){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return void setTimeout(wppaOvlRun,200)}wppaOvlShowNext(),wppaOvlTimer=setTimeout(wppaOvlRun,wppaOvlSlideSpeed)}}function wppaOvlShowPrev(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var p=wppaOvlCurIdx-1;p<0&&(p=wppaOvlUrls.length-1);var a=document.getElementById("wppa-pre-prev");return""!=wppaOvlVideoHtmls[p]||wppaIsIe||a.complete||!wppaOvlOpen?wppaOvlShow(p):setTimeout(wppaOvlShowPrev,200),!1}function wppaOvlShowNext(){if(wppaOvlIsSingle)return!1;jQuery("#wppa-ovl-spin").show(),wppaOvlFsPhotoId=0,wppaPhotoId=0;var p=wppaOvlCurIdx+1;p>wppaOvlUrls.length-1&&(p=0);var a=document.getElementById("wppa-pre-next");return""!=wppaOvlVideoHtmls[p]||wppaIsIe||a.complete||!wppaOvlOpen?wppaOvlShow(p):setTimeout(wppaOvlShowNext,200),!1}function wppaOvlShowSame(){var p,a;wppaOvlOpen&&(p=wppaOvlCurIdx,a=wppaOvlRunning,wppaOvlHide(!0),jQuery("#wppa-ovl-spin").show(),setTimeout(function(){wppaOvlShow(p),a&&setTimeout(wppaOvlStartStop(),wppaOvlSlideSpeed)},1e3))}function wppaOvlHide(p){var a=jQuery;wppaOvlOpen=!1,wppaOvlClosing=!wppaOvlClosing,wppaStopAudio(),p||"lightbox"!=wppaFsPolicy||wppaIsFs()&&wppaFsOff(),a("#wppa-overlay-ic").html("").hide(),a("#wppa-overlay-pc").html("").hide(),a("#wppa-overlay-fpc").html("").hide(),a("#wppa-overlay-zpc").html("").hide(),a(document).off("keydown",wppaOvlKeyboardHandler),wppaOvlFirst=!(wppaKbHandlerInstalled=!1),wppaOvlRunning=!1,clearTimeout(wppaOvlTimer),a("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,a("body").trigger("quitimage"),document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),a(window).trigger("wppalightboxend"),a(window).trigger("resize"),wppaOvlClosing&&wppaIsMobile?setTimeout(function(){wppaOvlHide(p)},250):(wppaOvlClosing=!1,p||setTimeout(function(){a("#wppa-overlay-bg").hide(),a("#wppa-ovl-spin").hide()},500))}function wppaOvlOnclick(p){switch(wppaOvlOnclickType){case"none":break;case"close":wppaOvlHide();break;case"browse":var a=p.screenX-window.screenX;48<p.clientY&&(a<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}return!0}function wppaInitOverlay(){var e=jQuery;e(".wp-caption").each(function(){var p=e(this),a=p.find("IMG[alt]").attr("alt")||"",t=p.find(".wp-caption-text").html()||"",p=p.find("a"),t=a+"<br>"+t;p.attr("data-lbtitle")||p.attr("data-lbtitle",t)});var p,a,t=e("a"),l=[];for(wppaOvlFsPhotoId=0,wppaPhotoId=0,(wppaOvlActivePanorama=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<t.length;a++)if(p=t[a],e(p).attr("data-rel")?l=e(p).attr("data-rel").split("["):p.rel?l=p.rel.split("["):l[0]="","wppa"==l[0])switch(wppaWppaOverlayActivated=!0,e(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaMagnifierCursor){case"pointer":e(p).css("cursor","pointer");break;case"":e(p).css("cursor","default");break;default:e(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}e(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaAdjustControlbar)}function wppaOvlResize(){0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( "+wppaOvlAnimSpeed+" )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout(wppaOvlStartAudio,100))}function wppaOvlImgClick(p){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(p.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var p="";return wppaOvlIsSingle||(p+='<span id="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:block;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-start-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"none":"block")+';" title="Start" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Play-Button",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-ovl-stop-btn" style="margin:0 2px;float:left;display:'+(wppaOvlRunning?"block":"none")+';" title="Stop" onclick="wppaOvlStartStop()" >'+wppaSvgHtml("Pause-Button",wppaOvlIconSize,!0,!0)+"</span>",p+='<span id="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:block;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>"),p+='<span id="wppa-exit-btn-2" style="margin:0 2px;float:right;display:block;" title="Exit" onclick="wppaOvlHide()" >'+wppaSvgHtml("Exit-2",wppaOvlIconSize,!0,!0)+"</span>","lightbox"!=wppaFsPolicy||wppaIsSafari||wppaIsIpad||(p+='<span id="wppa-fulls-btn-2" class="wppa-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen-2",wppaOvlIconSize,!0,!0)+'</span><span id="wppa-exit-fulls-btn-2" class="wppa-exit-fulls-btn" style="margin:0 2px;float:right;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen-2",wppaOvlIconSize,!0,!0)+"</span>"),p}jQuery(document).ready(function(p){wppaInitOverlay()}),jQuery(window).on("resize",function(){wppaOvlResize()});
js/wppa-spheric.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // contains wppa functions for simple zoomable photos
4
  //
5
- var wppaJsSphericVersion = '8.0.00.015';
6
 
7
  // The main proccedure
8
  function wppaDoSphericPan(mocc, xdata) {
@@ -231,7 +231,7 @@ wppaConsoleLog("spheric render called","force");
231
 
232
  function resize(mocc,e) {
233
 
234
- wppaConsoleLog("Resize spheric mocc "+mocc+" called by "+resize.caller,"force");
235
  var modeIsNormal = ! wppaIsFs();
236
 
237
  var newWidth;
@@ -245,7 +245,7 @@ wppaConsoleLog("spheric render called","force");
245
 
246
  if ( ! wppaOvlOpen ) return;
247
 
248
- $("#wppa-overlay-pc").css("display", "");
249
  $("#wppa-overlay-pc").css("width", "");
250
 
251
  var widthIsLim, modeIsNormal = ! wppaIsFs();
@@ -298,14 +298,14 @@ wppaConsoleLog("spheric render called","force");
298
  data.aspect = newWidth / newHeight;
299
 
300
  // Set css common for all 4 situations
301
- $("#wppa-ovl-pan-container").css({top:topMarg});
302
  $("#wppa-overlay-pc").css({top:0});
303
 
304
  // Now set css for all 4 situations: Mode is normal
305
  if ( modeIsNormal ) {
306
 
307
  // Common for mode normal
308
- $("#wppa-ovl-pan-container").css({
309
  backgroundColor:data.backgroundColor,
310
  padding:data.padding+"px",
311
  borderRadius:data.borderRadius+"px",
@@ -325,7 +325,7 @@ wppaConsoleLog("spheric render called","force");
325
  else {
326
 
327
  // Common for mode fullscreen
328
- $("#wppa-ovl-pan-container").css({
329
  backgroundColor:"transparent",
330
  padding:0,
331
  borderRadius:"0px",
@@ -521,7 +521,6 @@ wppaConsoleLog("spheric render called","force");
521
 
522
  // Re-initialize this
523
  function tabbyChange(mocc,e) {
524
- //wppaConsoleLog('Tabby change spheric '+mocc);
525
 
526
  data.wppaRenderer.state.reset();
527
  data = update(mocc,{
@@ -538,7 +537,7 @@ wppaConsoleLog("spheric render called","force");
538
 
539
  // Clean up
540
  function quitImage(mocc,e) {
541
- // wppaConsoleLog("Quit Image spheric "+mocc);
542
  data = update(mocc,{
543
  abort:true,
544
  autorun:false
@@ -547,9 +546,7 @@ wppaConsoleLog("spheric render called","force");
547
  clearInterval(data.intervalTimer);
548
  $("#wppa-pan-div-"+mocc+" canvas").hide();
549
  $("#wppa-pctl-div-"+mocc).hide();
550
- // data.wppaRenderer.state.reset();
551
- // data.wppaSphere.dispose();
552
- // data.wppaSphereMaterial.dispose();
553
  }
554
 
555
  // Get current time in ms
2
  //
3
  // contains wppa functions for simple zoomable photos
4
  //
5
+ var wppaJsSphericVersion = '8.0.00.016';
6
 
7
  // The main proccedure
8
  function wppaDoSphericPan(mocc, xdata) {
231
 
232
  function resize(mocc,e) {
233
 
234
+ // wppaConsoleLog("Resize spheric mocc "+mocc+" called by "+resize.caller,"force");
235
  var modeIsNormal = ! wppaIsFs();
236
 
237
  var newWidth;
245
 
246
  if ( ! wppaOvlOpen ) return;
247
 
248
+ $("#wppa-overlay-pc").show();
249
  $("#wppa-overlay-pc").css("width", "");
250
 
251
  var widthIsLim, modeIsNormal = ! wppaIsFs();
298
  data.aspect = newWidth / newHeight;
299
 
300
  // Set css common for all 4 situations
301
+ $("#wppa-ovl-sphericpan-container").css({top:topMarg});
302
  $("#wppa-overlay-pc").css({top:0});
303
 
304
  // Now set css for all 4 situations: Mode is normal
305
  if ( modeIsNormal ) {
306
 
307
  // Common for mode normal
308
+ $("#wppa-ovl-sphericpan-container").css({
309
  backgroundColor:data.backgroundColor,
310
  padding:data.padding+"px",
311
  borderRadius:data.borderRadius+"px",
325
  else {
326
 
327
  // Common for mode fullscreen
328
+ $("#wppa-ovl-sphericpan-container").css({
329
  backgroundColor:"transparent",
330
  padding:0,
331
  borderRadius:"0px",
521
 
522
  // Re-initialize this
523
  function tabbyChange(mocc,e) {
 
524
 
525
  data.wppaRenderer.state.reset();
526
  data = update(mocc,{
537
 
538
  // Clean up
539
  function quitImage(mocc,e) {
540
+
541
  data = update(mocc,{
542
  abort:true,
543
  autorun:false
546
  clearInterval(data.intervalTimer);
547
  $("#wppa-pan-div-"+mocc+" canvas").hide();
548
  $("#wppa-pctl-div-"+mocc).hide();
549
+ $("#wppa-overlay-pc").hide();
 
 
550
  }
551
 
552
  // Get current time in ms
js/wppa-spheric.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsSphericVersion="8.0.00.015";function wppaDoSphericPan(t,e){var s=jQuery;e&&(wppaSphericData[t]=e);var w=f(t,w);if(!w.initialized&&!w.abort&&(!w.isLightbox||wppaOvlOpen)){if(!w.isLightbox&&!wppaIsElementInViewport(s("#wppa-pan-div-"+t)))return setTimeout(function(){wppaDoSphericPan(t)},1e3),void f(t,{vtime:b()});w.wppaRenderer&&(w.wppaRenderer.state.reset(),w.wppaSphere.dispose(),w.wppaSphereMaterial.dispose(),w.texture.dispose()),w.isLightbox&&wppaOvlOpen&&(s("#wppa-ovl-spin").show(),s("#wppa-overlay-ic").html("")),w.manCtrl=!1,w.butDown=!1,w.lon=180,w.lat=0,w.dFov=0,w.abort=!1,w.aspect=2,w.div=s("#wppa-pan-div-"+t),w.left=s("#wppa-pctl-left-"+t),w.right=s("#wppa-pctl-right-"+t),w.up=s("#wppa-pctl-up-"+t),w.down=s("#wppa-pctl-down-"+t),w.zoomin=s("#wppa-pctl-zoomin-"+t),w.zoomout=s("#wppa-pctl-zoomout-"+t),w.prev=s("#wppa-pctl-prev-"+t),w.next=s("#wppa-pctl-next-"+t),w.pause=!1,w.mFakt=wppaIsMobile?"2":"1",w.time=0,w.isLightbox&&(wppaGlobalOvlPanoramaId++,w.uId=wppaGlobalOvlPanoramaId),s(w.div).html(""),w.wppaRenderer||(w.wppaRenderer=new THREE.WebGLRenderer),w.wppaRenderer.setSize(w.width,w.height),s(w.div).append(w.wppaRenderer.domElement),w.wppaScene=new THREE.Scene,w.wppaSphere=new THREE.SphereGeometry(100,100,40),w.wppaSphere.applyMatrix4((new THREE.Matrix4).makeScale(-1,1,1)),w.texture=(new THREE.TextureLoader).load(w.url),w.wppaSphereMaterial=new THREE.MeshBasicMaterial({map:w.texture}),w.wppaSphereMesh=new THREE.Mesh(w.wppaSphere,w.wppaSphereMaterial),w.wppaScene.add(w.wppaSphereMesh),w.right.on("touchstart",function(e){r(t)}),w.right.on("touchend",function(e){v(t)}),w.left.on("touchstart",function(e){u(t)}),w.left.on("touchend",function(e){v(t)}),w.up.on("touchstart",function(e){c(t)}),w.up.on("touchend",function(e){v(t)}),w.down.on("touchstart",function(e){m(t)}),w.down.on("touchend",function(e){v(t)}),w.zoomin.on("touchstart",function(e){p(t)}),w.zoomin.on("touchend",function(e){v(t)}),w.zoomout.on("touchstart",function(e){i(t)}),w.zoomout.on("touchend",function(e){v(t)}),w.enableManual&&0<s("#wppa-pan-div-"+t+" canvas").length&&(s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchstart",function(e){n(t,e)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchmove",function(e){a(t,e)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchend",function(e){o(t)})),w.right.on("mousedown",function(e){r(t)}),w.right.on("mouseup",function(e){v(t)}),w.left.on("mousedown",function(e){u(t)}),w.left.on("mouseup",function(e){v(t)}),w.up.on("mousedown",function(e){c(t)}),w.up.on("mouseup",function(e){v(t)}),w.down.on("mousedown",function(e){m(t)}),w.down.on("mouseup",function(e){v(t)}),w.zoomin.off("mousedown"),w.zoomin.on("mousedown",function(e){p(t)}),w.zoomin.off("mouseup"),w.zoomin.on("mouseup",function(e){v(t)}),w.zoomout.on("mousedown",function(e){i(t)}),w.zoomout.on("mouseup",function(e){v(t)}),w.enableManual&&0<s("#wppa-pan-div-"+t+" canvas").length&&(s("#wppa-pan-div-"+t+" canvas").on("mousedown",function(e){n(t,e)}),s("#wppa-pan-div-"+t+" canvas").on("mousemove",function(e){a(t,e)}),s("#wppa-pan-div-"+t+" canvas").on("mouseup",function(e){o(t)}),s("#wppa-pan-div-"+t+" canvas")[0].addEventListener("wheel",function(e){var n;n=t,(e=e).preventDefault(),e.stopPropagation(),w=f(n),f(n,{manCtrl:!1,butDown:!1,autorun:!1,dX:0,dFov:-e.deltaY*w.zoomsensitivity/(wppaIsChrome?60:6)}),l(n),setTimeout(function(){f(n,{dFov:0})},25)})),w.isLightbox&&(s("body").on("quitimage",function(e){var n;w=f(n=t,{abort:!0,autorun:!1}),clearTimeout(w.timer),clearInterval(w.intervalTimer),s("#wppa-pan-div-"+n+" canvas").hide(),s("#wppa-pctl-div-"+n).hide()}),s("#wppa-pctl-div-"+t).on("click",function(e){wppaKillEvent(e)})),f(t,w),s(window).on("wpparesizeend",function(e){h(t)}),wppaProtect(),s(document).on("tabbychange",function(e){var n;n=t,w.wppaRenderer.state.reset(),w=f(n,{initialized:!1,abort:!0}),setTimeout(function(){f(n,{abort:!1}),wppaDoSphericPan(n)},200),wppaConsoleLog("(setTimeout) redo spheric after tabbychange mocc="+n)}),h(t),w.intervalTimer=setInterval(function(){h(t)},1e3)}function l(e){wppaConsoleLog("spheric render called","force");var n=f(e),t=wppaIsElementInViewport(s("#wppa-pan-div-"+e+" canvas"));if(n.manCtrl||!(b()<n.time+25)){if(!t)return!(b()<n.vtime+1e3)&&(setTimeout(function(){l(e)},1e3),void f(e,{vtime:b()}));f(e,{time:b()}),n.isLightbox&&(!wppaOvlOpen||wppaOvlActivePanorama!=n.id||wppaGlobalOvlPanoramaId>n.uId)&&(abort=!0),n.abort||((n.butDown||n.manCtrl)&&n.autorun&&(n.autorun=!1,n.dX=0),0==n.dX&&0==n.dY&&0==n.dFov&&(n.pause=!0),n.butDown&&(n.pause=!1),n.fov+=n.dFov,n.fov=Math.max(20,Math.min(120,n.fov)),n.wppaCamera=new THREE.PerspectiveCamera(n.fov,n.aspect,1,1e3),n.wppaCamera.target=new THREE.Vector3(0,0,0),n.lon+=n.dX,n.lat+=n.dY,n.lat=Math.max(-85,Math.min(85,n.lat)),n.wppaCamera.target.x=500*Math.sin(THREE.Math.degToRad(90-n.lat))*Math.cos(THREE.Math.degToRad(n.lon)),n.wppaCamera.target.y=500*Math.cos(THREE.Math.degToRad(90-n.lat)),n.wppaCamera.target.z=500*Math.sin(THREE.Math.degToRad(90-n.lat))*Math.sin(THREE.Math.degToRad(n.lon)),n.wppaCamera.lookAt(n.wppaCamera.target),n.wppaRenderer&&n.wppaRenderer.render(n.wppaScene,n.wppaCamera),wppaAdjustControlbar(),s("#wppa-ovl-spin").hide(),n.manCtrl,(n.autorun||!n.pause&&(n.manCtrl||n.butDown))&&n.wppaRenderer&&(n.timer=setTimeout(function(){l(e)},25)),f(e,n))}}function h(e,n){wppaConsoleLog("Resize spheric mocc "+e+" called by "+h.caller,"force");var t=!wppaIsFs();if(w=f(e)){if(w.isLightbox){if(!wppaOvlOpen)return;s("#wppa-overlay-pc").css("display",""),s("#wppa-overlay-pc").css("width","");var a,o,p=(t=!wppaIsFs())?(o=window.innerWidth||screen.width,window.innerHeight||screen.height):(o=screen.width,screen.height),i=8,r=8+(w.controls?w.icsize+10:0)+30;t&&(i+=2*w.borderWidth,r+=2*w.borderWidth),a=(o-i)/2+r<p,r=t?a?(p-(c=(u=o-i)/2)-r)/2+20:(u=2*(c=p-r),20):(u=screen.width,c=screen.height,0),w.aspect=u/c,s("#wppa-ovl-pan-container").css({top:r}),s("#wppa-overlay-pc").css({top:0}),t?(s("#wppa-ovl-pan-container").css({backgroundColor:w.backgroundColor,padding:w.padding+"px",borderRadius:w.borderRadius+"px",width:u}),a?s("#wppa-overlay-pc").css({left:4}):s("#wppa-overlay-pc").css({left:(o-u)/2})):s("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",width:u,left:(o-u)/2}),w.wppaRenderer.setSize(u,c)}else{var u=s(w.div).parent().width(),c=parseInt(u/2);if(!w.wppaRenderer)return;w.wppaRenderer.setSize(u,c)}w.width=u,w.height=c,f(e,w),w.timer=setTimeout(function(){l(e)},250)}}function n(e,n){n.preventDefault(),n.stopPropagation(),w=f(e,{manCtrl:!0,butDown:!1,autorun:!1,dX:0}),n.touches?f(e,{sX:n.touches[0].clientX,sY:n.touches[0].clientY}):f(e,{sX:n.clientX,sY:n.clientY}),f(e,{sLon:w.lon,sLat:w.lat}),l(e)}function a(e,n){n.preventDefault(),n.stopPropagation(),(w=f(e)).manCtrl&&(n.touches?f(e,{lon:.1*(w.sX-n.touches[0].clientX)+w.sLon,lat:.1*(n.touches[0].clientY-w.sY)+w.sLat,pause:!1}):f(e,{lon:.1*(w.sX-n.clientX)+w.sLon,lat:.1*(n.clientY-w.sY)+w.sLat,pause:!1}),l(e))}function o(e){f(e,{manCtrl:!1})}function p(e){w=f(e),f(e,{dFov:-.4*w.mFakt,butDown:!0}),l(e)}function i(e){w=f(e),f(e,{dFov:.4*w.mFakt,butDown:!0}),l(e)}function r(e){w=f(e),f(e,{dX:.2*w.mFakt,butDown:!0}),l(e)}function u(e){w=f(e),f(e,{dX:-.2*w.mFakt,butDown:!0}),l(e)}function c(e){w=f(e),f(e,{dY:.2*w.mFakt,butDown:!0}),l(e)}function m(e){w=f(e),f(e,{dY:-.2*w.mFakt,butDown:!0}),l(e)}function v(e){w=f(e),f(e,{dX:0,dY:0,dFov:0,butDown:!1})}function f(e,n){if(!wppaSphericData[e])return!1;if(n)for(var t in n)wppaSphericData[e][t]=n[t];return wppaSphericData[e]}function b(){return d=new Date,d.getTime()}}
1
+ var wppaJsSphericVersion="8.0.00.016";function wppaDoSphericPan(t,e){var c=jQuery;e&&(wppaSphericData[t]=e);var s=f(t,s);if(!s.initialized&&!s.abort&&(!s.isLightbox||wppaOvlOpen)){if(!s.isLightbox&&!wppaIsElementInViewport(c("#wppa-pan-div-"+t)))return setTimeout(function(){wppaDoSphericPan(t)},1e3),void f(t,{vtime:b()});s.wppaRenderer&&(s.wppaRenderer.state.reset(),s.wppaSphere.dispose(),s.wppaSphereMaterial.dispose(),s.texture.dispose()),s.isLightbox&&wppaOvlOpen&&(c("#wppa-ovl-spin").show(),c("#wppa-overlay-ic").html("")),s.manCtrl=!1,s.butDown=!1,s.lon=180,s.lat=0,s.dFov=0,s.abort=!1,s.aspect=2,s.div=c("#wppa-pan-div-"+t),s.left=c("#wppa-pctl-left-"+t),s.right=c("#wppa-pctl-right-"+t),s.up=c("#wppa-pctl-up-"+t),s.down=c("#wppa-pctl-down-"+t),s.zoomin=c("#wppa-pctl-zoomin-"+t),s.zoomout=c("#wppa-pctl-zoomout-"+t),s.prev=c("#wppa-pctl-prev-"+t),s.next=c("#wppa-pctl-next-"+t),s.pause=!1,s.mFakt=wppaIsMobile?"2":"1",s.time=0,s.isLightbox&&(wppaGlobalOvlPanoramaId++,s.uId=wppaGlobalOvlPanoramaId),c(s.div).html(""),s.wppaRenderer||(s.wppaRenderer=new THREE.WebGLRenderer),s.wppaRenderer.setSize(s.width,s.height),c(s.div).append(s.wppaRenderer.domElement),s.wppaScene=new THREE.Scene,s.wppaSphere=new THREE.SphereGeometry(100,100,40),s.wppaSphere.applyMatrix4((new THREE.Matrix4).makeScale(-1,1,1)),s.texture=(new THREE.TextureLoader).load(s.url),s.wppaSphereMaterial=new THREE.MeshBasicMaterial({map:s.texture}),s.wppaSphereMesh=new THREE.Mesh(s.wppaSphere,s.wppaSphereMaterial),s.wppaScene.add(s.wppaSphereMesh),s.right.on("touchstart",function(e){u(t)}),s.right.on("touchend",function(e){v(t)}),s.left.on("touchstart",function(e){l(t)}),s.left.on("touchend",function(e){v(t)}),s.up.on("touchstart",function(e){h(t)}),s.up.on("touchend",function(e){v(t)}),s.down.on("touchstart",function(e){m(t)}),s.down.on("touchend",function(e){v(t)}),s.zoomin.on("touchstart",function(e){i(t)}),s.zoomin.on("touchend",function(e){v(t)}),s.zoomout.on("touchstart",function(e){r(t)}),s.zoomout.on("touchend",function(e){v(t)}),s.enableManual&&0<c("#wppa-pan-div-"+t+" canvas").length&&(c("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchstart",function(e){a(t,e)}),c("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchmove",function(e){o(t,e)}),c("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchend",function(e){p(t)})),s.right.on("mousedown",function(e){u(t)}),s.right.on("mouseup",function(e){v(t)}),s.left.on("mousedown",function(e){l(t)}),s.left.on("mouseup",function(e){v(t)}),s.up.on("mousedown",function(e){h(t)}),s.up.on("mouseup",function(e){v(t)}),s.down.on("mousedown",function(e){m(t)}),s.down.on("mouseup",function(e){v(t)}),s.zoomin.off("mousedown"),s.zoomin.on("mousedown",function(e){i(t)}),s.zoomin.off("mouseup"),s.zoomin.on("mouseup",function(e){v(t)}),s.zoomout.on("mousedown",function(e){r(t)}),s.zoomout.on("mouseup",function(e){v(t)}),s.enableManual&&0<c("#wppa-pan-div-"+t+" canvas").length&&(c("#wppa-pan-div-"+t+" canvas").on("mousedown",function(e){a(t,e)}),c("#wppa-pan-div-"+t+" canvas").on("mousemove",function(e){o(t,e)}),c("#wppa-pan-div-"+t+" canvas").on("mouseup",function(e){p(t)}),c("#wppa-pan-div-"+t+" canvas")[0].addEventListener("wheel",function(e){var n;n=t,(e=e).preventDefault(),e.stopPropagation(),s=f(n),f(n,{manCtrl:!1,butDown:!1,autorun:!1,dX:0,dFov:-e.deltaY*s.zoomsensitivity/(wppaIsChrome?60:6)}),w(n),setTimeout(function(){f(n,{dFov:0})},25)})),s.isLightbox&&(c("body").on("quitimage",function(e){var n;s=f(n=t,{abort:!0,autorun:!1}),clearTimeout(s.timer),clearInterval(s.intervalTimer),c("#wppa-pan-div-"+n+" canvas").hide(),c("#wppa-pctl-div-"+n).hide(),c("#wppa-overlay-pc").hide()}),c("#wppa-pctl-div-"+t).on("click",function(e){wppaKillEvent(e)})),f(t,s),c(window).on("wpparesizeend",function(e){n(t)}),wppaProtect(),c(document).on("tabbychange",function(e){var n;n=t,s.wppaRenderer.state.reset(),s=f(n,{initialized:!1,abort:!0}),setTimeout(function(){f(n,{abort:!1}),wppaDoSphericPan(n)},200),wppaConsoleLog("(setTimeout) redo spheric after tabbychange mocc="+n)}),n(t),s.intervalTimer=setInterval(function(){n(t)},1e3)}function w(e){wppaConsoleLog("spheric render called","force");var n=f(e),t=wppaIsElementInViewport(c("#wppa-pan-div-"+e+" canvas"));if(n.manCtrl||!(b()<n.time+25)){if(!t)return!(b()<n.vtime+1e3)&&(setTimeout(function(){w(e)},1e3),void f(e,{vtime:b()}));f(e,{time:b()}),n.isLightbox&&(!wppaOvlOpen||wppaOvlActivePanorama!=n.id||wppaGlobalOvlPanoramaId>n.uId)&&(abort=!0),n.abort||((n.butDown||n.manCtrl)&&n.autorun&&(n.autorun=!1,n.dX=0),0==n.dX&&0==n.dY&&0==n.dFov&&(n.pause=!0),n.butDown&&(n.pause=!1),n.fov+=n.dFov,n.fov=Math.max(20,Math.min(120,n.fov)),n.wppaCamera=new THREE.PerspectiveCamera(n.fov,n.aspect,1,1e3),n.wppaCamera.target=new THREE.Vector3(0,0,0),n.lon+=n.dX,n.lat+=n.dY,n.lat=Math.max(-85,Math.min(85,n.lat)),n.wppaCamera.target.x=500*Math.sin(THREE.Math.degToRad(90-n.lat))*Math.cos(THREE.Math.degToRad(n.lon)),n.wppaCamera.target.y=500*Math.cos(THREE.Math.degToRad(90-n.lat)),n.wppaCamera.target.z=500*Math.sin(THREE.Math.degToRad(90-n.lat))*Math.sin(THREE.Math.degToRad(n.lon)),n.wppaCamera.lookAt(n.wppaCamera.target),n.wppaRenderer&&n.wppaRenderer.render(n.wppaScene,n.wppaCamera),wppaAdjustControlbar(),c("#wppa-ovl-spin").hide(),n.manCtrl,(n.autorun||!n.pause&&(n.manCtrl||n.butDown))&&n.wppaRenderer&&(n.timer=setTimeout(function(){w(e)},25)),f(e,n))}}function n(e){var n=!wppaIsFs();if(s=f(e)){if(s.isLightbox){if(!wppaOvlOpen)return;c("#wppa-overlay-pc").show(),c("#wppa-overlay-pc").css("width","");var t,a,o=(n=!wppaIsFs())?(a=window.innerWidth||screen.width,window.innerHeight||screen.height):(a=screen.width,screen.height),p=8,i=8+(s.controls?s.icsize+10:0)+30;n&&(p+=2*s.borderWidth,i+=2*s.borderWidth),t=(a-p)/2+i<o,i=n?t?(o-(u=(r=a-p)/2)-i)/2+20:(r=2*(u=o-i),20):(r=screen.width,u=screen.height,0),s.aspect=r/u,c("#wppa-ovl-sphericpan-container").css({top:i}),c("#wppa-overlay-pc").css({top:0}),n?(c("#wppa-ovl-sphericpan-container").css({backgroundColor:s.backgroundColor,padding:s.padding+"px",borderRadius:s.borderRadius+"px",width:r}),t?c("#wppa-overlay-pc").css({left:4}):c("#wppa-overlay-pc").css({left:(a-r)/2})):c("#wppa-ovl-sphericpan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",width:r,left:(a-r)/2}),s.wppaRenderer.setSize(r,u)}else{var r=c(s.div).parent().width(),u=parseInt(r/2);if(!s.wppaRenderer)return;s.wppaRenderer.setSize(r,u)}s.width=r,s.height=u,f(e,s),s.timer=setTimeout(function(){w(e)},250)}}function a(e,n){n.preventDefault(),n.stopPropagation(),s=f(e,{manCtrl:!0,butDown:!1,autorun:!1,dX:0}),n.touches?f(e,{sX:n.touches[0].clientX,sY:n.touches[0].clientY}):f(e,{sX:n.clientX,sY:n.clientY}),f(e,{sLon:s.lon,sLat:s.lat}),w(e)}function o(e,n){n.preventDefault(),n.stopPropagation(),(s=f(e)).manCtrl&&(n.touches?f(e,{lon:.1*(s.sX-n.touches[0].clientX)+s.sLon,lat:.1*(n.touches[0].clientY-s.sY)+s.sLat,pause:!1}):f(e,{lon:.1*(s.sX-n.clientX)+s.sLon,lat:.1*(n.clientY-s.sY)+s.sLat,pause:!1}),w(e))}function p(e){f(e,{manCtrl:!1})}function i(e){s=f(e),f(e,{dFov:-.4*s.mFakt,butDown:!0}),w(e)}function r(e){s=f(e),f(e,{dFov:.4*s.mFakt,butDown:!0}),w(e)}function u(e){s=f(e),f(e,{dX:.2*s.mFakt,butDown:!0}),w(e)}function l(e){s=f(e),f(e,{dX:-.2*s.mFakt,butDown:!0}),w(e)}function h(e){s=f(e),f(e,{dY:.2*s.mFakt,butDown:!0}),w(e)}function m(e){s=f(e),f(e,{dY:-.2*s.mFakt,butDown:!0}),w(e)}function v(e){s=f(e),f(e,{dX:0,dY:0,dFov:0,butDown:!1})}function f(e,n){if(!wppaSphericData[e])return!1;if(n)for(var t in n)wppaSphericData[e][t]=n[t];return wppaSphericData[e]}function b(){return d=new Date,d.getTime()}}
js/wppa-zoom.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // contains wppa functions for simple zoomable photos
4
  //
5
- var wppaJsZoomVersion = '8.0.00.015';
6
 
7
  // The main proccedure
8
  function wppaDoZoomPan(mocc, xdata) {
@@ -18,7 +18,7 @@ function wppaDoZoomPan(mocc, xdata) {
18
  // If lightbox, show spinner
19
  if ( data.isLightbox ) {
20
  $("#wppa-ovl-spin").show();
21
- $("#wppa-ovl-pan-container").hide();
22
  }
23
 
24
  // Wait until the image file has been completely loaded
@@ -297,7 +297,7 @@ function wppaDoZoomPan(mocc, xdata) {
297
  if ( data.isLightbox ) {
298
 
299
  // Show image container
300
- $("#wppa-overlay-pc").css("display", "");
301
 
302
  // There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
303
  var widthIsLim;
@@ -367,8 +367,8 @@ function wppaDoZoomPan(mocc, xdata) {
367
  }
368
 
369
  // Set css common for all 4 situations
370
- $("#wppa-ovl-pan-container").css({top:topMarg});//,width:newWidth});
371
- $("#wppa-overlay-pc").css({top:0,left:0});
372
 
373
  data.canvasWidth = newWidth;
374
  data.canvasHeight = newHeight;
@@ -380,7 +380,7 @@ function wppaDoZoomPan(mocc, xdata) {
380
  if ( modeIsNormal ) {
381
 
382
  // Common for mode normal
383
- $("#wppa-ovl-pan-container").css({
384
  backgroundColor:data.backgroundColor,
385
  padding:data.padding,
386
  borderRadius:data.borderRadius+"px",
@@ -393,10 +393,10 @@ function wppaDoZoomPan(mocc, xdata) {
393
 
394
  // Limit specific
395
  if ( widthIsLim ) {
396
- $("#wppa-overlay-pc").css({left:4});
397
  }
398
  else {
399
- $("#wppa-overlay-pc").css({left:(contWidth-newWidth)/2});
400
  }
401
  }
402
 
@@ -404,8 +404,8 @@ function wppaDoZoomPan(mocc, xdata) {
404
  else {
405
 
406
  // Common for mode fullscreen
407
- $("#wppa-overlay-pc").css({marginLeft:0});
408
- $("#wppa-ovl-pan-container").css({
409
  backgroundColor:"transparent",
410
  padding:0,
411
  borderRadius:"0px",
@@ -433,7 +433,7 @@ function wppaDoZoomPan(mocc, xdata) {
433
  update(mocc, data);
434
  setTimeout(function(){render(mocc)},250);
435
 
436
- $("#wppa-ovl-pan-container").show();
437
  }
438
  /*
439
  // Previous in lightbox
@@ -718,6 +718,7 @@ function wppaDoZoomPan(mocc, xdata) {
718
  });
719
  $(data.canvas).hide();
720
  $("#wppa-pctl-div-"+data.itemId).hide();
 
721
  }
722
 
723
  }
2
  //
3
  // contains wppa functions for simple zoomable photos
4
  //
5
+ var wppaJsZoomVersion = '8.0.00.016';
6
 
7
  // The main proccedure
8
  function wppaDoZoomPan(mocc, xdata) {
18
  // If lightbox, show spinner
19
  if ( data.isLightbox ) {
20
  $("#wppa-ovl-spin").show();
21
+ $("#wppa-ovl-zoom-container").hide();
22
  }
23
 
24
  // Wait until the image file has been completely loaded
297
  if ( data.isLightbox ) {
298
 
299
  // Show image container
300
+ $("#wppa-overlay-zpc").css("display", "");
301
 
302
  // There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
303
  var widthIsLim;
367
  }
368
 
369
  // Set css common for all 4 situations
370
+ $("#wppa-ovl-zoom-container").css({top:topMarg});//,width:newWidth});
371
+ $("#wppa-overlay-zpc").css({top:0,left:0});
372
 
373
  data.canvasWidth = newWidth;
374
  data.canvasHeight = newHeight;
380
  if ( modeIsNormal ) {
381
 
382
  // Common for mode normal
383
+ $("#wppa-ovl-zoom-container").css({
384
  backgroundColor:data.backgroundColor,
385
  padding:data.padding,
386
  borderRadius:data.borderRadius+"px",
393
 
394
  // Limit specific
395
  if ( widthIsLim ) {
396
+ $("#wppa-overlay-zpc").css({left:4});
397
  }
398
  else {
399
+ $("#wppa-overlay-zpc").css({left:(contWidth-newWidth)/2});
400
  }
401
  }
402
 
404
  else {
405
 
406
  // Common for mode fullscreen
407
+ $("#wppa-overlay-zpc").css({marginLeft:0});
408
+ $("#wppa-ovl-zoom-container").css({
409
  backgroundColor:"transparent",
410
  padding:0,
411
  borderRadius:"0px",
433
  update(mocc, data);
434
  setTimeout(function(){render(mocc)},250);
435
 
436
+ $("#wppa-ovl-zoom-container").show();
437
  }
438
  /*
439
  // Previous in lightbox
718
  });
719
  $(data.canvas).hide();
720
  $("#wppa-pctl-div-"+data.itemId).hide();
721
+ $("#wppa-ovl-zoom-container").hide();
722
  }
723
 
724
  }
js/wppa-zoom.min.js CHANGED
@@ -1 +1 @@
1
- var wppaJsZoomVersion="8.0.00.015";function wppaDoZoomPan(n,a){var p=jQuery;a&&(wppaZoomData[n]=a);var o=l(n);if(!o.initialized&&!o.abort){if(o.isLightbox&&(p("#wppa-ovl-spin").show(),p("#wppa-ovl-pan-container").hide()),!o.image.complete)return wppaConsoleLog("Loading image "+n),void setTimeout(function(){wppaDoZoomPan(n)},200);wppaConsoleLog("Loading image "+n+" complete"),p(image).css({width:image.naturalWidth,height:image.naturalHeight,maxWidth:image.naturalWidth,maxHeight:image.naturalHeight}),o.manual=!1,o.deltaX=0,o.deltaY=0,o.deltaFactor=1,o.busy=!1,o.div=p("#wppa-pan-div-"+o.itemId),o.canvas=document.getElementById("wppa-pan-canvas-"+o.itemId),o.left=p("#wppa-pctl-left-"+o.itemId),o.right=p("#wppa-pctl-right-"+o.itemId),o.up=p("#wppa-pctl-up-"+o.itemId),o.down=p("#wppa-pctl-down-"+o.itemId),o.zoomin=p("#wppa-pctl-zoomin-"+o.itemId),o.zoomout=p("#wppa-pctl-zoomout-"+o.itemId),o.prev=p("#wppa-pctl-prev-"+o.itemId),o.next=p("#wppa-pctl-next-"+o.itemId),o.exit=p("#wppa-exit-btn-2"),o.canvasWidth=o.width,o.canvasHeight=o.height,o.savedCanvasX=0,o.savedCanvasY=0,o.fromHeight=o.image.height,o.fromWidth=o.image.width,o.imageRatio=o.image.width/o.image.height,o.fromX=0,o.fromY=0,o.centerX=o.fromX+o.fromWidth/2,o.centerY=o.fromY+o.fromHeight/2,o.ctx=null,o.buttondown=!1,o.enableManual=!0,o.ctrlbarUpdate=!0,o.pause=!1,o.time=0,o.right.on("touchstart",function(a){e(n)}),o.right.on("touchend",function(a){h(n)}),o.left.on("touchstart",function(a){i(n)}),o.left.on("touchend",function(a){h(n)}),o.up.on("touchstart",function(a){s(n)}),o.up.on("touchend",function(a){h(n)}),o.down.on("touchstart",function(a){r(n)}),o.down.on("touchend",function(a){h(n)}),o.zoomin.on("touchstart",function(a){c(n)}),o.zoomin.on("touchend",function(a){h(n)}),o.zoomout.on("touchstart",function(a){u(n)}),o.zoomout.on("touchend",function(a){h(n)}),o.canvas&&(o.canvas.addEventListener("touchstart",function(a){f(n,a)}),o.canvas.addEventListener("touchmove",function(a){g(n,a)}),o.canvas.addEventListener("touchend",function(a){w(n)})),o.canvas&&(o.canvas.addEventListener("mousedown",function(a){f(n,a)}),o.canvas.addEventListener("mousemove",function(a){g(n,a)}),o.canvas.addEventListener("mouseup",function(a){w(n)}),o.canvas.addEventListener("mouseleave",function(a){(o=l(n)).manual&&l(n,{pause:!0})}),o.canvas.addEventListener("mouseenter",function(a){var t;l(t=n,{pause:!1}).manual&&m(t)}),document.getElementById("wppa-pan-canvas-"+o.itemId).addEventListener("wheel",function(a){var t;t=n,(a=a).preventDefault(),a.stopPropagation(),o=l(t),l(t,{deltaFactor:1+a.deltaY*o.zoomsensitivity/(wppaIsChrome?1e4:1e3),manual:!1,burrondown:!1}),m(t),setTimeout(function(){l(t,{deltaFactor:1})},25)})),o.right.on("mousedown",function(a){e(n)}),o.right.on("mouseup",function(a){h(n)}),o.left.on("mousedown",function(a){i(n)}),o.left.on("mouseup",function(a){h(n)}),o.up.on("mousedown",function(a){s(n)}),o.up.on("mouseup",function(a){h(n)}),o.down.on("mousedown",function(a){r(n)}),o.down.on("mouseup",function(a){h(n)}),o.zoomin.off("mousedown"),o.zoomin.on("mousedown",function(a){c(n)}),o.zoomin.off("mouseup"),o.zoomin.on("mouseup",function(a){h(n)}),o.zoomout.on("mousedown",function(a){u(n)}),o.zoomout.on("mouseup",function(a){h(n)}),o.isLightbox&&(p("body").on("quitimage",function(a){var t;t=n,wppaConsoleLog("Zoom Quit Image"),o=l(t,{abort:!0}),p(o.canvas).hide(),p("#wppa-pctl-div-"+o.itemId).hide()}),p("#wppa-pctl-div-"+o.itemId).on("click",function(a){wppaKillEvent(a)})),o.isLightbox?(p(window).off("resize",wppaOvlShowSame),p(window).on("resize",wppaOvlShowSame)):p(window).on("resize",function(a){t(n)}),t(n),o.initialized=!0,l(n,o),p("#wppa-ovl-spin").hide(),wppaProtect()}function m(a){var t,n,o,e,i,s=l(a);s.canvas&&(L()<s.time+10?wppaConsoleLog("Skipped render "+a):(l(a,{time:L()}),(s.isLightbox&&!wppaOvlOpen||!s.isLightbox&&wppaOvlOpen)&&(s=l(0,{abort:!0})),s.abort?l(a,{manual:!1,buttondown:!1,pause:!1,ctx:null}):s.busy||(wppaDebugCounter++,wppaConsoleLog("Render zoom "+a+" "+wppaDebugCounter),(s=l(a,{busy:!0})).manual||(s.fromX+=s.deltaX,s.fromY+=s.deltaY,t=s.fromHeight/s.deltaFactor,n=s.fromWidth/s.deltaFactor,50<t&&1!=s.deltaFactor&&(wppaIsFs()||t<=s.image.height)?(s.fromX-=(n-s.fromWidth)/2,s.fromY-=(t-s.fromHeight)/2,s.fromWidth=n,s.fromHeight=t):s.buttondown=!1),s.fromX=Math.max(0,Math.min(s.image.width-s.fromWidth,s.fromX)),s.fromY=Math.max(0,Math.min(s.image.height-s.fromHeight,s.fromY)),o=screen.width/screen.height,e=(1-s.image.width/s.fromWidth)*s.canvas.width/2,i=(1-s.image.height/s.fromHeight)*s.canvas.height/2,s.ctx=s.canvas.getContext("2d"),o>s.imageRatio&&t>s.image.height&&wppaIsFs()||o<=s.imageRatio&&n>s.image.width&&wppaIsFs()?(s.enableManual=!1,s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height),s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,e,i,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"default"})):(s.enableManual=!0,s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,0,0,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"grab"})),wppaIsFs()?(s.fsMaskTop=i-(s.canvas.height-screen.height)/2,s.fsMaskLeft=e-(s.canvas.width-screen.width)/2,s.fsMaskBottom=screen.height-s.fsMaskTop,s.fsMaskRight=screen.width-s.fsMaskLeft):(s.fsMaskTop=0,s.fsMaskLeft=0,s.fsMaskBottom=0,s.fsMaskRight=0),s.ctrlbarUpdate&&(wppaAdjustControlbar(),s.ctrlbarUpdate=!1),s.busy=!1,wppaIsElementInViewport(s.canvas)||(s.buttondown=!1),l(a,s),s.pause||!s.manual&&!s.buttondown||setTimeout(function(){m(a)},10),s.pause&&l(a,{pause:!1}))))}function t(a){var t,n,o,e,i,s,r,c,d,u=l(a);u&&(u.isLightbox?(p("#wppa-overlay-pc").css("display",""),e=(n=!wppaIsFs())?(o=window.innerWidth||screen.width,window.innerHeight||screen.height):(o=screen.width,screen.height),r=0,d=(c=8)+(u.controls?u.icsize+10:0)+10,n?(c+=2*u.borderWidth,d+=2*u.borderWidth):c=40,t=n?e-d>(o-c)/u.imageRatio:(screenRatio=screen.width/screen.height,screenRatio<u.imageRatio),n&&t&&(r=(e-(s=(i=o-c)/u.imageRatio)-d)/2+20),n&&!t&&(s=(i=u.imageRatio*(e-(u.controls?u.icsize:0)-48))/u.imageRatio,r=20),!n&&t&&(i=(s=screen.height)*u.imageRatio,r=0),n||t||(s=(i=screen.width)/u.imageRatio,r=(screen.height-s)/2),p("#wppa-ovl-pan-container").css({top:r}),p("#wppa-overlay-pc").css({top:0,left:0}),u.canvasWidth=i,u.canvasHeight=s,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight,n?(p("#wppa-ovl-pan-container").css({backgroundColor:u.backgroundColor,padding:u.padding,borderRadius:u.borderRadius+"px",borderWidth:u.borderWidth+"px",width:i,marginLeft:0}),t?p("#wppa-overlay-pc").css({left:4}):p("#wppa-overlay-pc").css({left:(o-i)/2})):(p("#wppa-overlay-pc").css({marginLeft:0}),p("#wppa-ovl-pan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",borderWidth:"0px",width:i,left:(o-i)/2,position:"fixed"}))):(u.canvasWidth=p(u.div).parent().width(),u.canvasHeight=u.canvasWidth/u.imageRatio,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight),u.ctrlbarUpdate=!0,l(a,u),setTimeout(function(){m(a)},250),p("#wppa-ovl-pan-container").show())}function e(a){var t=l(a),t=t.image.naturalWidth/t.canvas.width;t<1.5&&(t=1.5),l(a,{deltaX:t*=1.5,buttondown:!0,manual:!1}),m(a)}function i(a){var t=l(a),t=t.image.naturalWidth/t.canvas.width;t<1.5&&(t=1.5),l(a,{deltaX:-(t*=1.5),buttondown:!0,manual:!1}),m(a)}function s(a){var t=l(a),t=t.image.naturalHeight/t.canvas.height;t<1.5&&(t=1.5),l(a,{deltaY:-(t*=1.5),buttondown:!0,manual:!1}),m(a)}function r(a){var t=l(a),t=t.image.naturalHeight/t.canvas.height;t<1.5&&(t=1.5),l(a,{deltaY:t*=1.5,buttondown:!0,manual:!1}),m(a)}function c(a){l(a,{deltaFactor:1.005,buttondown:!0,manual:!1}),m(a)}function u(a){l(a,{deltaFactor:.995,buttondown:!0,manual:!1}),m(a)}function h(a){l(a,{deltaX:0,deltaY:0,deltaFactor:1,buttondown:!1})}function f(a,t){var n=l(a),o=v(t).X,e=v(t).Y;if(wppaIsFs()&&n.isLightbox&&(o<n.fsMaskLeft||o>n.fsMaskRight||e<n.fsMaskTop||e>n.fsMaskBottom))return l(0,{abort:!0}),void jQuery("#wppa-overlay-bg").trigger("click");n.enableManual&&(l(a,{manual:!0,savedCanvasX:o=b(a,t).X,savedCanvasY:e=b(a,t).Y,buttondown:!1}),m(a))}function g(a,t){var n,o=l(a),e=b(a,t).X,i=b(a,t).Y;o.manual&&(n=o.canvas.width/o.fromWidth,t=(o.savedCanvasX-e)/n+o.fromX,n=(o.savedCanvasY-i)/n+o.fromY,0<t&&0<n&&t+o.fromWidth<o.image.width&&n+o.fromHeight<o.image.height&&l(a,{fromX:t,fromY:n,savedCanvasX:e,savedCanvasY:i}))}function w(a){l(a,{manual:!1})}function l(a,t){if(!wppaZoomData[a])return!1;if(t)for(var n in t)wppaZoomData[a][n]=t[n];return wppaZoomData[a]}function v(a){var t;return a=a.touches?(t=a.touches[0].screenX,a.touches[0].screenY):(t=a.screenX,a.screenY),{X:t,Y:a}}function b(a,t){var n;return t=t.touches?(a=l(a),n=t.touches[0].screenX-a.fsMaskLeft,t.touches[0].screenY-a.fsMaskTop):(n=t.offsetX,t.offsetY),{X:n,Y:t}}function L(){return d=new Date,d.getTime()}}
1
+ var wppaJsZoomVersion="8.0.00.016";function wppaDoZoomPan(o,t){var m=jQuery;t&&(wppaZoomData[o]=t);var n=l(o);if(!n.initialized&&!n.abort){if(n.isLightbox&&(m("#wppa-ovl-spin").show(),m("#wppa-ovl-zoom-container").hide()),!n.image.complete)return wppaConsoleLog("Loading image "+o),void setTimeout(function(){wppaDoZoomPan(o)},200);wppaConsoleLog("Loading image "+o+" complete"),m(image).css({width:image.naturalWidth,height:image.naturalHeight,maxWidth:image.naturalWidth,maxHeight:image.naturalHeight}),n.manual=!1,n.deltaX=0,n.deltaY=0,n.deltaFactor=1,n.busy=!1,n.div=m("#wppa-pan-div-"+n.itemId),n.canvas=document.getElementById("wppa-pan-canvas-"+n.itemId),n.left=m("#wppa-pctl-left-"+n.itemId),n.right=m("#wppa-pctl-right-"+n.itemId),n.up=m("#wppa-pctl-up-"+n.itemId),n.down=m("#wppa-pctl-down-"+n.itemId),n.zoomin=m("#wppa-pctl-zoomin-"+n.itemId),n.zoomout=m("#wppa-pctl-zoomout-"+n.itemId),n.prev=m("#wppa-pctl-prev-"+n.itemId),n.next=m("#wppa-pctl-next-"+n.itemId),n.exit=m("#wppa-exit-btn-2"),n.canvasWidth=n.width,n.canvasHeight=n.height,n.savedCanvasX=0,n.savedCanvasY=0,n.fromHeight=n.image.height,n.fromWidth=n.image.width,n.imageRatio=n.image.width/n.image.height,n.fromX=0,n.fromY=0,n.centerX=n.fromX+n.fromWidth/2,n.centerY=n.fromY+n.fromHeight/2,n.ctx=null,n.buttondown=!1,n.enableManual=!0,n.ctrlbarUpdate=!0,n.pause=!1,n.time=0,n.right.on("touchstart",function(t){e(o)}),n.right.on("touchend",function(t){h(o)}),n.left.on("touchstart",function(t){i(o)}),n.left.on("touchend",function(t){h(o)}),n.up.on("touchstart",function(t){s(o)}),n.up.on("touchend",function(t){h(o)}),n.down.on("touchstart",function(t){r(o)}),n.down.on("touchend",function(t){h(o)}),n.zoomin.on("touchstart",function(t){c(o)}),n.zoomin.on("touchend",function(t){h(o)}),n.zoomout.on("touchstart",function(t){u(o)}),n.zoomout.on("touchend",function(t){h(o)}),n.canvas&&(n.canvas.addEventListener("touchstart",function(t){f(o,t)}),n.canvas.addEventListener("touchmove",function(t){w(o,t)}),n.canvas.addEventListener("touchend",function(t){g(o)})),n.canvas&&(n.canvas.addEventListener("mousedown",function(t){f(o,t)}),n.canvas.addEventListener("mousemove",function(t){w(o,t)}),n.canvas.addEventListener("mouseup",function(t){g(o)}),n.canvas.addEventListener("mouseleave",function(t){(n=l(o)).manual&&l(o,{pause:!0})}),n.canvas.addEventListener("mouseenter",function(t){var a;l(a=o,{pause:!1}).manual&&p(a)}),document.getElementById("wppa-pan-canvas-"+n.itemId).addEventListener("wheel",function(t){var a;a=o,(t=t).preventDefault(),t.stopPropagation(),n=l(a),l(a,{deltaFactor:1+t.deltaY*n.zoomsensitivity/(wppaIsChrome?1e4:1e3),manual:!1,burrondown:!1}),p(a),setTimeout(function(){l(a,{deltaFactor:1})},25)})),n.right.on("mousedown",function(t){e(o)}),n.right.on("mouseup",function(t){h(o)}),n.left.on("mousedown",function(t){i(o)}),n.left.on("mouseup",function(t){h(o)}),n.up.on("mousedown",function(t){s(o)}),n.up.on("mouseup",function(t){h(o)}),n.down.on("mousedown",function(t){r(o)}),n.down.on("mouseup",function(t){h(o)}),n.zoomin.off("mousedown"),n.zoomin.on("mousedown",function(t){c(o)}),n.zoomin.off("mouseup"),n.zoomin.on("mouseup",function(t){h(o)}),n.zoomout.on("mousedown",function(t){u(o)}),n.zoomout.on("mouseup",function(t){h(o)}),n.isLightbox&&(m("body").on("quitimage",function(t){var a;a=o,wppaConsoleLog("Zoom Quit Image"),n=l(a,{abort:!0}),m(n.canvas).hide(),m("#wppa-pctl-div-"+n.itemId).hide(),m("#wppa-ovl-zoom-container").hide()}),m("#wppa-pctl-div-"+n.itemId).on("click",function(t){wppaKillEvent(t)})),n.isLightbox?(m(window).off("resize",wppaOvlShowSame),m(window).on("resize",wppaOvlShowSame)):m(window).on("resize",function(t){a(o)}),a(o),n.initialized=!0,l(o,n),m("#wppa-ovl-spin").hide(),wppaProtect()}function p(t){var a,o,n,e,i,s=l(t);s.canvas&&(z()<s.time+10?wppaConsoleLog("Skipped render "+t):(l(t,{time:z()}),(s.isLightbox&&!wppaOvlOpen||!s.isLightbox&&wppaOvlOpen)&&(s=l(0,{abort:!0})),s.abort?l(t,{manual:!1,buttondown:!1,pause:!1,ctx:null}):s.busy||(wppaDebugCounter++,wppaConsoleLog("Render zoom "+t+" "+wppaDebugCounter),(s=l(t,{busy:!0})).manual||(s.fromX+=s.deltaX,s.fromY+=s.deltaY,a=s.fromHeight/s.deltaFactor,o=s.fromWidth/s.deltaFactor,50<a&&1!=s.deltaFactor&&(wppaIsFs()||a<=s.image.height)?(s.fromX-=(o-s.fromWidth)/2,s.fromY-=(a-s.fromHeight)/2,s.fromWidth=o,s.fromHeight=a):s.buttondown=!1),s.fromX=Math.max(0,Math.min(s.image.width-s.fromWidth,s.fromX)),s.fromY=Math.max(0,Math.min(s.image.height-s.fromHeight,s.fromY)),n=screen.width/screen.height,e=(1-s.image.width/s.fromWidth)*s.canvas.width/2,i=(1-s.image.height/s.fromHeight)*s.canvas.height/2,s.ctx=s.canvas.getContext("2d"),n>s.imageRatio&&a>s.image.height&&wppaIsFs()||n<=s.imageRatio&&o>s.image.width&&wppaIsFs()?(s.enableManual=!1,s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height),s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,e,i,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"default"})):(s.enableManual=!0,s.ctx.drawImage(s.image,s.fromX,s.fromY,s.fromWidth,s.fromHeight,0,0,s.canvas.width,s.canvas.height),jQuery(s.canvas).css({cursor:"grab"})),wppaIsFs()?(s.fsMaskTop=i-(s.canvas.height-screen.height)/2,s.fsMaskLeft=e-(s.canvas.width-screen.width)/2,s.fsMaskBottom=screen.height-s.fsMaskTop,s.fsMaskRight=screen.width-s.fsMaskLeft):(s.fsMaskTop=0,s.fsMaskLeft=0,s.fsMaskBottom=0,s.fsMaskRight=0),s.ctrlbarUpdate&&(wppaAdjustControlbar(),s.ctrlbarUpdate=!1),s.busy=!1,wppaIsElementInViewport(s.canvas)||(s.buttondown=!1),l(t,s),s.pause||!s.manual&&!s.buttondown||setTimeout(function(){p(t)},10),s.pause&&l(t,{pause:!1}))))}function a(t){var a,o,n,e,i,s,r,c,d,u=l(t);u&&(u.isLightbox?(m("#wppa-overlay-zpc").css("display",""),e=(o=!wppaIsFs())?(n=window.innerWidth||screen.width,window.innerHeight||screen.height):(n=screen.width,screen.height),r=0,d=(c=8)+(u.controls?u.icsize+10:0)+10,o?(c+=2*u.borderWidth,d+=2*u.borderWidth):c=40,a=o?e-d>(n-c)/u.imageRatio:(screenRatio=screen.width/screen.height,screenRatio<u.imageRatio),o&&a&&(r=(e-(s=(i=n-c)/u.imageRatio)-d)/2+20),o&&!a&&(s=(i=u.imageRatio*(e-(u.controls?u.icsize:0)-48))/u.imageRatio,r=20),!o&&a&&(i=(s=screen.height)*u.imageRatio,r=0),o||a||(s=(i=screen.width)/u.imageRatio,r=(screen.height-s)/2),m("#wppa-ovl-zoom-container").css({top:r}),m("#wppa-overlay-zpc").css({top:0,left:0}),u.canvasWidth=i,u.canvasHeight=s,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight,o?(m("#wppa-ovl-zoom-container").css({backgroundColor:u.backgroundColor,padding:u.padding,borderRadius:u.borderRadius+"px",borderWidth:u.borderWidth+"px",width:i,marginLeft:0}),a?m("#wppa-overlay-zpc").css({left:4}):m("#wppa-overlay-zpc").css({left:(n-i)/2})):(m("#wppa-overlay-zpc").css({marginLeft:0}),m("#wppa-ovl-zoom-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",borderWidth:"0px",width:i,left:(n-i)/2,position:"fixed"}))):(u.canvasWidth=m(u.div).parent().width(),u.canvasHeight=u.canvasWidth/u.imageRatio,u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight),u.ctrlbarUpdate=!0,l(t,u),setTimeout(function(){p(t)},250),m("#wppa-ovl-zoom-container").show())}function e(t){var a=l(t),a=a.image.naturalWidth/a.canvas.width;a<1.5&&(a=1.5),l(t,{deltaX:a*=1.5,buttondown:!0,manual:!1}),p(t)}function i(t){var a=l(t),a=a.image.naturalWidth/a.canvas.width;a<1.5&&(a=1.5),l(t,{deltaX:-(a*=1.5),buttondown:!0,manual:!1}),p(t)}function s(t){var a=l(t),a=a.image.naturalHeight/a.canvas.height;a<1.5&&(a=1.5),l(t,{deltaY:-(a*=1.5),buttondown:!0,manual:!1}),p(t)}function r(t){var a=l(t),a=a.image.naturalHeight/a.canvas.height;a<1.5&&(a=1.5),l(t,{deltaY:a*=1.5,buttondown:!0,manual:!1}),p(t)}function c(t){l(t,{deltaFactor:1.005,buttondown:!0,manual:!1}),p(t)}function u(t){l(t,{deltaFactor:.995,buttondown:!0,manual:!1}),p(t)}function h(t){l(t,{deltaX:0,deltaY:0,deltaFactor:1,buttondown:!1})}function f(t,a){var o=l(t),n=v(a).X,e=v(a).Y;if(wppaIsFs()&&o.isLightbox&&(n<o.fsMaskLeft||n>o.fsMaskRight||e<o.fsMaskTop||e>o.fsMaskBottom))return l(0,{abort:!0}),void jQuery("#wppa-overlay-bg").trigger("click");o.enableManual&&(l(t,{manual:!0,savedCanvasX:n=b(t,a).X,savedCanvasY:e=b(t,a).Y,buttondown:!1}),p(t))}function w(t,a){var o,n=l(t),e=b(t,a).X,i=b(t,a).Y;n.manual&&(o=n.canvas.width/n.fromWidth,a=(n.savedCanvasX-e)/o+n.fromX,o=(n.savedCanvasY-i)/o+n.fromY,0<a&&0<o&&a+n.fromWidth<n.image.width&&o+n.fromHeight<n.image.height&&l(t,{fromX:a,fromY:o,savedCanvasX:e,savedCanvasY:i}))}function g(t){l(t,{manual:!1})}function l(t,a){if(!wppaZoomData[t])return!1;if(a)for(var o in a)wppaZoomData[t][o]=a[o];return wppaZoomData[t]}function v(t){var a;return t=t.touches?(a=t.touches[0].screenX,t.touches[0].screenY):(a=t.screenX,t.screenY),{X:a,Y:t}}function b(t,a){var o;return a=a.touches?(t=l(t),o=a.touches[0].screenX-t.fsMaskLeft,a.touches[0].screenY-t.fsMaskTop):(o=a.offsetX,a.offsetY),{X:o,Y:a}}function z(){return d=new Date,d.getTime()}}
theme/wppa-style.css CHANGED
@@ -8,7 +8,7 @@
8
  /*
9
  /* You may always look into a newer version of this file to see what new classes and id's come with an upgrade
10
  /*
11
- /* This is version 8.0.00.012
12
  */
13
 
14
  .wppa-container, .wppa-cover-box, .wppa-thumb-area {
@@ -588,7 +588,7 @@ display:none;
588
  text-align:center;
589
  background-color:transparent;
590
  }
591
- #wppa-overlay-pc {
592
  position:fixed;
593
  z-index:200005;
594
  margin-top:0;
@@ -599,7 +599,7 @@ display:none;
599
  text-align:center;
600
  background-color:transparent;
601
  }
602
- #wppa-ovl-pan-container {
603
  position:fixed;
604
  top:0;
605
  }
8
  /*
9
  /* You may always look into a newer version of this file to see what new classes and id's come with an upgrade
10
  /*
11
+ /* This is version 8.0.00.016
12
  */
13
 
14
  .wppa-container, .wppa-cover-box, .wppa-thumb-area {
588
  text-align:center;
589
  background-color:transparent;
590
  }
591
+ #wppa-overlay-pc, #wppa-overlay-fpc, #wppa-overlay-zpc {
592
  position:fixed;
593
  z-index:200005;
594
  margin-top:0;
599
  text-align:center;
600
  background-color:transparent;
601
  }
602
+ #wppa-ovl-sphericpan-container, #wppa-ovl-flatpan-container,#wppa-ovl-zoom-container {
603
  position:fixed;
604
  top:0;
605
  }
wppa-album-covers.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
- * Version 8.0.00.008
7
  *
8
  */
9
 
@@ -85,7 +85,6 @@ global $wpdb;
85
 
86
  // Init
87
  $album = wppa_cache_album( $albumid );
88
- $alt = wppa( 'alt' );
89
 
90
  // Multi column responsive?
91
  if ( $multicolresp ) $mcr = 'mcr-'; else $mcr = '';
@@ -213,7 +212,7 @@ global $wpdb;
213
  }
214
 
215
  // Set up album cover style
216
- $style = wppa_wcs( 'wppa-box' ) . wppa_wcs( 'wppa-' . wppa( 'alt' ) );
217
  if ( is_feed() ) {
218
  $style .= ' padding:7px;';
219
  }
@@ -241,8 +240,7 @@ global $wpdb;
241
  'album ' .
242
  'wppa-box ' .
243
  'wppa-cover-box ' .
244
- 'wppa-cover-box-' . $mcr . wppa( 'mocc' ) . ' ' .
245
- 'wppa-' . wppa( 'alt' ) .
246
  '"' .
247
  ' style="' . $style . wppa_wcs( 'wppa-cover-box' ) . '"' .
248
  ' >'
@@ -364,8 +362,6 @@ global $wpdb;
364
  // Close the album box
365
  wppa_out( '</div>' );
366
 
367
- // Toggel alt/even
368
- wppa_toggle_alt();
369
  }
370
 
371
  // Type Image Factory
@@ -493,7 +489,7 @@ global $wpdb;
493
  $href_content = "#";
494
  }
495
 
496
- $style = wppa_wcs( 'wppa-box' ) . wppa_wcs( 'wppa-' . wppa( 'alt' ) );
497
  if ( is_feed() ) $style .= ' padding:7px;';
498
 
499
  $style .= wppa_get_cover_width( 'cover' );
@@ -520,7 +516,6 @@ global $wpdb;
520
  'wppa-box ' .
521
  'wppa-cover-box ' .
522
  'wppa-cover-box-' . $mcr . wppa( 'mocc' ) . ' ' .
523
- 'wppa-' . wppa( 'alt' ) .
524
  '"' .
525
  ' style="' . $style . wppa_wcs( 'wppa-cover-box' ) . '"' .
526
  ' >'
@@ -611,9 +606,6 @@ global $wpdb;
611
 
612
  // Close the album box
613
  wppa_out( '</div>' );
614
-
615
- // Toggle alt/even
616
- wppa_toggle_alt();
617
  }
618
 
619
  // Type Long Description
@@ -711,7 +703,7 @@ global $wpdb;
711
 
712
  $photo_pos = wppa( 'coverphoto_pos' );
713
 
714
- $style = wppa_wcs( 'wppa-box' ) . wppa_wcs( 'wppa-' . wppa( 'alt' ) );
715
  if ( is_feed() ) $style .= ' padding:7px;';
716
 
717
  $style .= wppa_get_cover_width( 'cover' );
@@ -737,7 +729,6 @@ global $wpdb;
737
  'wppa-box ' .
738
  'wppa-cover-box ' .
739
  'wppa-cover-box-' . $mcr . wppa( 'mocc' ) . ' ' .
740
- 'wppa-' . wppa( 'alt' ) .
741
  '"' .
742
  ' style="' . $style . wppa_wcs( 'wppa-cover-box' ) . '"' .
743
  ' >'
@@ -821,8 +812,6 @@ global $wpdb;
821
  // Close the album box
822
  wppa_out( '</div>' );
823
 
824
- // Toggle alt/even
825
- wppa_toggle_alt();
826
  }
827
 
828
  // The cover type grid
@@ -832,7 +821,6 @@ global $wpdb;
832
 
833
  // Init
834
  $album = wppa_cache_album( $id );
835
- $alt = wppa( 'alt' );
836
 
837
  // Find album details
838
  $coverphoto = wppa_get_coverphoto_id( $id );
@@ -934,7 +922,6 @@ global $wpdb;
934
  'wppa-box ' .
935
  'wppa-cover-box ' .
936
  'wppa-cover-box-' . wppa( 'mocc' ) . ' ' .
937
- 'wppa-' . wppa( 'alt' ) .
938
  '"' .
939
  ' style="' . $style . wppa_wcs( 'wppa-cover-box' ) . '"' .
940
  ' >'
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
+ * Version 8.0.00.016
7
  *
8
  */
9
 
85
 
86
  // Init
87
  $album = wppa_cache_album( $albumid );
 
88
 
89
  // Multi column responsive?
90
  if ( $multicolresp ) $mcr = 'mcr-'; else $mcr = '';
212
  }
213
 
214
  // Set up album cover style
215
+ $style = wppa_wcs( 'wppa-box' );
216
  if ( is_feed() ) {
217
  $style .= ' padding:7px;';
218
  }
240
  'album ' .
241
  'wppa-box ' .
242
  'wppa-cover-box ' .
243
+ 'wppa-cover-box-' . $mcr . wppa( 'mocc' ) .
 
244
  '"' .
245
  ' style="' . $style . wppa_wcs( 'wppa-cover-box' ) . '"' .
246
  ' >'
362
  // Close the album box
363
  wppa_out( '</div>' );
364
 
 
 
365
  }
366
 
367
  // Type Image Factory
489
  $href_content = "#";
490
  }
491
 
492
+ $style = wppa_wcs( 'wppa-box' );
493
  if ( is_feed() ) $style .= ' padding:7px;';
494
 
495
  $style .= wppa_get_cover_width( 'cover' );
516
  'wppa-box ' .
517
  'wppa-cover-box ' .
518
  'wppa-cover-box-' . $mcr . wppa( 'mocc' ) . ' ' .
 
519
  '"' .
520
  ' style="' . $style . wppa_wcs( 'wppa-cover-box' ) . '"' .
521
  ' >'
606
 
607
  // Close the album box
608
  wppa_out( '</div>' );
 
 
 
609
  }
610
 
611
  // Type Long Description
703
 
704
  $photo_pos = wppa( 'coverphoto_pos' );
705
 
706
+ $style = wppa_wcs( 'wppa-box' );
707
  if ( is_feed() ) $style .= ' padding:7px;';
708
 
709
  $style .= wppa_get_cover_width( 'cover' );
729
  'wppa-box ' .
730
  'wppa-cover-box ' .
731
  'wppa-cover-box-' . $mcr . wppa( 'mocc' ) . ' ' .
 
732
  '"' .
733
  ' style="' . $style . wppa_wcs( 'wppa-cover-box' ) . '"' .
734
  ' >'
812
  // Close the album box
813
  wppa_out( '</div>' );
814
 
 
 
815
  }
816
 
817
  // The cover type grid
821
 
822
  // Init
823
  $album = wppa_cache_album( $id );
 
824
 
825
  // Find album details
826
  $coverphoto = wppa_get_coverphoto_id( $id );
922
  'wppa-box ' .
923
  'wppa-cover-box ' .
924
  'wppa-cover-box-' . wppa( 'mocc' ) . ' ' .
 
925
  '"' .
926
  ' style="' . $style . wppa_wcs( 'wppa-cover-box' ) . '"' .
927
  ' >'
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 8.0.00.014
7
  *
8
  */
9
 
@@ -15,7 +15,6 @@ function wppa_thumb_area( $action ) {
15
  // Init
16
  $result = '';
17
  $mocc = wppa( 'mocc' );
18
- $alt = wppa( 'alt' );
19
  $maxh = wppa_opt( 'area_size' );
20
  $nice = wppa_switch( 'nicescroll' ) && ! wppa_is_mobile();
21
  $overflow = 'visible';
@@ -30,7 +29,7 @@ function wppa_thumb_area( $action ) {
30
  $result .= '<div'.
31
  ' id="wppa-thumb-area-' . $mocc . '"' .
32
  ' class="wppa-thumb-area"' .
33
- ' style="' . wppa_wcs( 'wppa-box' ) . wppa_wcs( 'wppa-' . $alt ) . '"' .
34
  ' >';
35
  }
36
  else {
@@ -40,11 +39,9 @@ function wppa_thumb_area( $action ) {
40
  ' class="' .
41
  'wppa-thumb-area ' .
42
  'wppa-thumb-area-' . $mocc . ' ' .
43
- 'wppa-box wppa-' . $alt .
44
  '"' .
45
  ' style="' .
46
  wppa_wcs( 'wppa-box' ) .
47
- wppa_wcs( 'wppa-' . $alt ) .
48
  ( $maxh > '1' ? 'max-height:' . $maxh . 'px;' : '' ) .
49
  'overflow:' . $overflow . ';' .
50
  '"' .
@@ -61,9 +58,6 @@ function wppa_thumb_area( $action ) {
61
  $result .= '<div class="wppa-nicewrap" >';
62
  }
63
 
64
- // Toggle alt/even
65
- wppa_toggle_alt();
66
-
67
  // Display create subalbum and upload photo links conditionally
68
  if ( ! wppa_is_virtual() && wppa_opt( 'upload_link_thumbs' ) == 'top' ) {
69
 
@@ -123,7 +117,6 @@ function wppa_contest_box() {
123
  // Init
124
  $result = '';
125
  $mocc = wppa( 'mocc' );
126
- $alt = wppa( 'alt' );
127
  $maxh = wppa_opt( 'area_size' );
128
  $nice = wppa_switch( 'nicescroll' ) && ! wppa_is_mobile();
129
  $overflow = 'visible';
@@ -137,7 +130,7 @@ function wppa_contest_box() {
137
  $result .= '<div'.
138
  ' id="wppa-thumb-area-' . $mocc . '"' .
139
  ' class="wppa-thumb-area"' .
140
- ' style="' . wppa_wcs( 'wppa-box' ) . wppa_wcs( 'wppa-' . $alt ) . '"' .
141
  ' >';
142
  }
143
  else {
@@ -148,11 +141,9 @@ function wppa_contest_box() {
148
  'wppa-contest ' .
149
  'wppa-thumb-area ' .
150
  'wppa-thumb-area-' . $mocc . ' ' .
151
- 'wppa-box wppa-' . $alt .
152
  '"' .
153
  ' style="' .
154
  wppa_wcs( 'wppa-box' ) .
155
- wppa_wcs( 'wppa-' . $alt ) .
156
  ( $maxh > '1' ? 'max-height:' . $maxh . 'px;' : '' ) .
157
  'overflow:' . $overflow . ';' .
158
  '"' .
@@ -165,9 +156,6 @@ function wppa_contest_box() {
165
  $result .= '<div class="wppa-nicewrap" >';
166
  }
167
 
168
- // Toggle alt/even
169
- wppa_toggle_alt();
170
-
171
  $result .= wppa_get_contest_html( wppa( 'start_album' ) );
172
 
173
  // After content
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 8.0.00.016
7
  *
8
  */
9
 
15
  // Init
16
  $result = '';
17
  $mocc = wppa( 'mocc' );
 
18
  $maxh = wppa_opt( 'area_size' );
19
  $nice = wppa_switch( 'nicescroll' ) && ! wppa_is_mobile();
20
  $overflow = 'visible';
29
  $result .= '<div'.
30
  ' id="wppa-thumb-area-' . $mocc . '"' .
31
  ' class="wppa-thumb-area"' .
32
+ ' style="' . wppa_wcs( 'wppa-box' ) . '"' .
33
  ' >';
34
  }
35
  else {
39
  ' class="' .
40
  'wppa-thumb-area ' .
41
  'wppa-thumb-area-' . $mocc . ' ' .
 
42
  '"' .
43
  ' style="' .
44
  wppa_wcs( 'wppa-box' ) .
 
45
  ( $maxh > '1' ? 'max-height:' . $maxh . 'px;' : '' ) .
46
  'overflow:' . $overflow . ';' .
47
  '"' .
58
  $result .= '<div class="wppa-nicewrap" >';
59
  }
60
 
 
 
 
61
  // Display create subalbum and upload photo links conditionally
62
  if ( ! wppa_is_virtual() && wppa_opt( 'upload_link_thumbs' ) == 'top' ) {
63
 
117
  // Init
118
  $result = '';
119
  $mocc = wppa( 'mocc' );
 
120
  $maxh = wppa_opt( 'area_size' );
121
  $nice = wppa_switch( 'nicescroll' ) && ! wppa_is_mobile();
122
  $overflow = 'visible';
130
  $result .= '<div'.
131
  ' id="wppa-thumb-area-' . $mocc . '"' .
132
  ' class="wppa-thumb-area"' .
133
+ ' style="' . wppa_wcs( 'wppa-box' ) . '"' .
134
  ' >';
135
  }
136
  else {
141
  'wppa-contest ' .
142
  'wppa-thumb-area ' .
143
  'wppa-thumb-area-' . $mocc . ' ' .
 
144
  '"' .
145
  ' style="' .
146
  wppa_wcs( 'wppa-box' ) .
 
147
  ( $maxh > '1' ? 'max-height:' . $maxh . 'px;' : '' ) .
148
  'overflow:' . $overflow . ';' .
149
  '"' .
156
  $result .= '<div class="wppa-nicewrap" >';
157
  }
158
 
 
 
 
159
  $result .= wppa_get_contest_html( wppa( 'start_album' ) );
160
 
161
  // After content
wppa-common-functions.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
- * Version 8.0.00.014
6
  *
7
  */
8
 
@@ -233,7 +233,6 @@ global $wppa_current_shortcode_atts;
233
  'is_supersearch' => false,
234
  'supersearch' => '',
235
  'is_mobile' => wppa_is_mobile(),
236
- 'alt' => 'even',
237
  'is_wppa_tree' => false,
238
  'is_calendar' => false,
239
  'calendar' => '',
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
+ * Version 8.0.00.016
6
  *
7
  */
8
 
233
  'is_supersearch' => false,
234
  'supersearch' => '',
235
  'is_mobile' => wppa_is_mobile(),
 
236
  'is_wppa_tree' => false,
237
  'is_calendar' => false,
238
  'calendar' => '',
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 8.0.00.015
7
  *
8
  */
9
 
@@ -3793,7 +3793,6 @@ global $blog_id;
3793
  wppa_out( wppa_nonce_field( 'wppa-check' , 'wppa-nonce', false, false ) );
3794
 
3795
  if ( wppa_page( 'oneofone' ) ) wppa( 'portrait_only', true );
3796
- wppa( 'alt', 'alt' );
3797
 
3798
  // Javascript occurrence dependant stuff
3799
  wppa_out( wppa_js( "\n" . '<script type="text/javascript" >' ) );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 8.0.00.016
7
  *
8
  */
9
 
3793
  wppa_out( wppa_nonce_field( 'wppa-check' , 'wppa-nonce', false, false ) );
3794
 
3795
  if ( wppa_page( 'oneofone' ) ) wppa( 'portrait_only', true );
 
3796
 
3797
  // Javascript occurrence dependant stuff
3798
  wppa_out( wppa_js( "\n" . '<script type="text/javascript" >' ) );
wppa-import.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the import pages and functions
6
- * Version 8.0.00.007
7
  *
8
  */
9
 
@@ -2547,6 +2547,8 @@ global $wppa_session;
2547
  }
2548
  }
2549
  }
 
 
2550
  }
2551
 
2552
  // Not a db table, a photo cusom data .csv file
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the import pages and functions
6
+ * Version 8.0.00.016
7
  *
8
  */
9
 
2547
  }
2548
  }
2549
  }
2550
+ wppa_schedule_maintenance_proc( 'wppa_remake_index_albums' );
2551
+ wppa_schedule_maintenance_proc( 'wppa_remake_index_photos' );
2552
  }
2553
 
2554
  // Not a db table, a photo cusom data .csv file
wppa-non-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
- * Version 8.0.00.015
7
  *
8
  */
9
 
@@ -459,6 +459,24 @@ global $wppa_session;
459
  >
460
  </div>';
461
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
462
  // The preload images
463
  echo '
464
  <img
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 8.0.00.016
7
  *
8
  */
9
 
459
  >
460
  </div>';
461
 
462
+ // The lightbox wrapper for flat panos
463
+ echo '
464
+ <div
465
+ id="wppa-overlay-fpc"
466
+ onwheel="return false;"
467
+ onscroll="return false;"
468
+ >
469
+ </div>';
470
+
471
+ // The lightbox wrapper for zoomables
472
+ echo '
473
+ <div
474
+ id="wppa-overlay-zpc"
475
+ onwheel="return false;"
476
+ onscroll="return false;"
477
+ >
478
+ </div>';
479
+
480
  // The preload images
481
  echo '
482
  <img
wppa-picture.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Make the picture html
6
- * Version 8.0.00.015
7
  *
8
  */
9
 
@@ -195,6 +195,7 @@ function wppa_get_picture_html( $args ) {
195
  ' data-id="' . wppa_encrypt_photo( $id ) . '"' .
196
  ' href="' . $link['url'] . '"' .
197
  ( $lbtitle ? ' ' . 'data-lbtitle' . '="'.esc_attr($lbtitle).'"' : '' ) .
 
198
  ( $videobody ? ' data-videohtml="' . $videobody . '"' : '' ) .
199
  ( $audiobody ? ' data-audiohtml="' . $audiobody . '"' : '' ) .
200
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
@@ -358,9 +359,28 @@ function wppa_get_picture_html( $args ) {
358
  // Get full html for a lightbox pan image, e.g. ' data-panorama="'..."' for use in lightbox anchor link
359
  function wppa_get_lb_panorama_full_html( $id ) {
360
 
361
- $result = wppa_get_lb_panorama_html( $id );
362
- if ( $result ) {
363
- return ' data-panorama="' . esc_attr( $result ) . '"';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
364
  }
365
  else {
366
  return '';
@@ -463,7 +483,7 @@ function wppa_get_spheric_pan_html( $args ) {
463
  $result .= '</a>';
464
  }
465
  if ( $lightbox ) {
466
- $result .= '<div id="wppa-ovl-pan-container" >';
467
  }
468
  if ( $lightbox ) {
469
  $mocc = '0';
@@ -725,7 +745,7 @@ function wppa_get_flat_pan_html( $args ) {
725
 
726
  // The overall container
727
  if ( $lightbox ) {
728
- $result .= '<div id="wppa-ovl-pan-container" >';
729
  }
730
 
731
  // The canvas container
@@ -888,7 +908,7 @@ function wppa_get_flat_pan_html( $args ) {
888
  '</div>';
889
  }
890
 
891
- // wppa-ovl-pan-container
892
  ( $lightbox ? '</div>' : '' );
893
 
894
  // The js part
@@ -1156,7 +1176,7 @@ function wppa_get_flat_pan_html( $args ) {
1156
  if ( ! stop ) {
1157
  stop = true;
1158
  $(this).css({opacity:0.5});
1159
- $("#wppa-overlay-pc").css({display:"none"});
1160
  $("#wppa-ovl-spin").show();
1161
  wppaOvlShowPrev();
1162
  }
@@ -1170,7 +1190,7 @@ function wppa_get_flat_pan_html( $args ) {
1170
  if ( ! stop ) {
1171
  stop = true;
1172
  $(this).css({opacity:0.5});
1173
- $("#wppa-overlay-pc").css({display:"none"});
1174
  $("#wppa-ovl-spin").show();
1175
  wppaOvlShowNext();
1176
  }
@@ -1265,7 +1285,7 @@ function wppa_get_flat_pan_html( $args ) {
1265
  ( $lightbox ?
1266
 
1267
  // Show image container
1268
- '$("#wppa-overlay-pc").css("display", "");' .
1269
 
1270
  // There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
1271
  'var widthIsLim,
@@ -1317,7 +1337,7 @@ function wppa_get_flat_pan_html( $args ) {
1317
  '}' .
1318
 
1319
  // Set css common for all 4 situations
1320
- '$("#wppa-ovl-pan-container").css({top:topMarg,marginTop:0});
1321
 
1322
  canvas.width = newWidth;
1323
  canvas.height = newHeight;
@@ -1328,7 +1348,7 @@ function wppa_get_flat_pan_html( $args ) {
1328
  'if ( modeIsNormal ) {' .
1329
 
1330
  // Common for mode normal
1331
- '$("#wppa-ovl-pan-container").css({
1332
  backgroundColor:"' . wppa_opt( 'ovl_theme' ) . '",
1333
  padding:"' . wppa_opt( 'ovl_border_width' ) . 'px",
1334
  borderRadius:"' . wppa_opt( 'ovl_border_radius' ) . 'px",
@@ -1338,10 +1358,10 @@ function wppa_get_flat_pan_html( $args ) {
1338
 
1339
  // Limit specific
1340
  'if ( widthIsLim ) {
1341
- $("#wppa-overlay-pc").css({left:4});
1342
  }
1343
  else {
1344
- $("#wppa-overlay-pc").css({left:(contWidth-newWidth)/2});
1345
  }
1346
  wppaAdjustControlbar();
1347
  }' .
@@ -1350,14 +1370,14 @@ function wppa_get_flat_pan_html( $args ) {
1350
  'else {' .
1351
 
1352
  // Common for mode fullscreen
1353
- '$("#wppa-overlay-pc").css({marginLeft:0});
1354
- $("#wppa-ovl-pan-container").css({
1355
  backgroundColor:"transparent",
1356
  padding:0,
1357
  borderRadius:"0px",
1358
  width:newWidth,
1359
  left:(contWidth-newWidth)/2
1360
- });' .
1361
  'wppaAdjustControlbar();' .
1362
 
1363
  '}' .
@@ -1524,7 +1544,7 @@ function wppa_get_zoom_pan_html( $args ) {
1524
  if ( $lightbox ) {
1525
  $result .=
1526
  '<div
1527
- id="wppa-ovl-pan-container"
1528
  style="background-color:' . wppa_opt( 'ovl_theme' ) . ';"
1529
  >';
1530
  }
@@ -1689,7 +1709,7 @@ function wppa_get_zoom_pan_html( $args ) {
1689
  '</div>';
1690
  }
1691
 
1692
- // wppa-ovl-pan-container
1693
  if ( $lightbox ) {
1694
  $result .=
1695
  '</div>';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Make the picture html
6
+ * Version 8.0.00.016
7
  *
8
  */
9
 
195
  ' data-id="' . wppa_encrypt_photo( $id ) . '"' .
196
  ' href="' . $link['url'] . '"' .
197
  ( $lbtitle ? ' ' . 'data-lbtitle' . '="'.esc_attr($lbtitle).'"' : '' ) .
198
+ ( wppa_is_zoomable( $id ) ? ' data-pantype="zoom"' : '' ) .
199
  ( $videobody ? ' data-videohtml="' . $videobody . '"' : '' ) .
200
  ( $audiobody ? ' data-audiohtml="' . $audiobody . '"' : '' ) .
201
  ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
359
  // Get full html for a lightbox pan image, e.g. ' data-panorama="'..."' for use in lightbox anchor link
360
  function wppa_get_lb_panorama_full_html( $id ) {
361
 
362
+ $html = wppa_get_lb_panorama_html( $id );
363
+ if ( $html ) {
364
+ $result = ' data-panorama="' . esc_attr( $html ) . '"';
365
+
366
+ wppa_log('obs', 'Id='.$id.', panorama='.wppa_get_photo_item( $id, 'panorama' ));
367
+
368
+ switch ( wppa_get_photo_item( $id, 'panorama' ) ) {
369
+ case '0': // none
370
+ if ( wppa_is_zoomable( $id ) ) {
371
+ $result .= ' data-pantype="zoom"';
372
+ }
373
+ break;
374
+ case '1': // spheric
375
+ $result .= ' data-pantype="spheric"';
376
+ break;
377
+ case '2': // flat
378
+ $result .= ' data-pantype="flat"';
379
+ break;
380
+ default:
381
+ break;
382
+ }
383
+ return $result;
384
  }
385
  else {
386
  return '';
483
  $result .= '</a>';
484
  }
485
  if ( $lightbox ) {
486
+ $result .= '<div id="wppa-ovl-sphericpan-container" >';
487
  }
488
  if ( $lightbox ) {
489
  $mocc = '0';
745
 
746
  // The overall container
747
  if ( $lightbox ) {
748
+ $result .= '<div id="wppa-ovl-flatpan-container" >';
749
  }
750
 
751
  // The canvas container
908
  '</div>';
909
  }
910
 
911
+ // wppa-ovl-flatpan-container
912
  ( $lightbox ? '</div>' : '' );
913
 
914
  // The js part
1176
  if ( ! stop ) {
1177
  stop = true;
1178
  $(this).css({opacity:0.5});
1179
+ $("#wppa-overlay-fpc").css({display:"none"});
1180
  $("#wppa-ovl-spin").show();
1181
  wppaOvlShowPrev();
1182
  }
1190
  if ( ! stop ) {
1191
  stop = true;
1192
  $(this).css({opacity:0.5});
1193
+ $("#wppa-overlay-fpc").css({display:"none"});
1194
  $("#wppa-ovl-spin").show();
1195
  wppaOvlShowNext();
1196
  }
1285
  ( $lightbox ?
1286
 
1287
  // Show image container
1288
+ '$("#wppa-overlay-fpc").css("display", "");' .
1289
 
1290
  // There are 4 possiblilities: all combi of 'Width is the limit or not' and 'Mode is normal or fullscreen'
1291
  'var widthIsLim,
1337
  '}' .
1338
 
1339
  // Set css common for all 4 situations
1340
+ '$("#wppa-ovl-flatpan-container").css({top:topMarg,marginTop:0});
1341
 
1342
  canvas.width = newWidth;
1343
  canvas.height = newHeight;
1348
  'if ( modeIsNormal ) {' .
1349
 
1350
  // Common for mode normal
1351
+ '$("#wppa-ovl-flatpan-container").css({
1352
  backgroundColor:"' . wppa_opt( 'ovl_theme' ) . '",
1353
  padding:"' . wppa_opt( 'ovl_border_width' ) . 'px",
1354
  borderRadius:"' . wppa_opt( 'ovl_border_radius' ) . 'px",
1358
 
1359
  // Limit specific
1360
  'if ( widthIsLim ) {
1361
+ $("#wppa-overlay-fpc").css({left:4});
1362
  }
1363
  else {
1364
+ $("#wppa-overlay-fpc").css({left:(contWidth-newWidth)/2});
1365
  }
1366
  wppaAdjustControlbar();
1367
  }' .
1370
  'else {' .
1371
 
1372
  // Common for mode fullscreen
1373
+ '$("#wppa-overlay-fpc").css({marginLeft:0});
1374
+ $("#wppa-ovl-flatpan-container").css({
1375
  backgroundColor:"transparent",
1376
  padding:0,
1377
  borderRadius:"0px",
1378
  width:newWidth,
1379
  left:(contWidth-newWidth)/2
1380
+ });' .
1381
  'wppaAdjustControlbar();' .
1382
 
1383
  '}' .
1544
  if ( $lightbox ) {
1545
  $result .=
1546
  '<div
1547
+ id="wppa-ovl-zoom-container"
1548
  style="background-color:' . wppa_opt( 'ovl_theme' ) . ';"
1549
  >';
1550
  }
1709
  '</div>';
1710
  }
1711
 
1712
+ // wppa-ovl-zoom-container
1713
  if ( $lightbox ) {
1714
  $result .=
1715
  '</div>';
wppa-thumbnails.php CHANGED
@@ -5,7 +5,7 @@
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
- * Version 8.0.00.014
9
  *
10
  */
11
 
@@ -834,7 +834,7 @@ global $thlinkmsggiven;
834
  $photo_left = wppa_switch( 'thumbphoto_left' );
835
  $class_asym = 'wppa-asym-text-frame-'.$mcr.$mocc;
836
 
837
- $style = wppa_wcs( 'wppa-box' ).wppa_wcs( 'wppa-'.wppa( 'alt' ) );
838
  if ( is_feed() ) $style .= ' padding:7px;';
839
 
840
  $wid = wppa_get_cover_width( 'thumb' );
@@ -852,7 +852,7 @@ global $thlinkmsggiven;
852
 
853
  $result .= "\n" . '<div' .
854
  ' id="thumb-' . $xid . '-' . $mocc . '"' .
855
- ' class="thumb wppa-box wppa-cover-box wppa-cover-box-' . $mcr . $mocc . ' wppa-' . wppa( 'alt' ) . '"' .
856
  ' style="' . $style . '"' .
857
  ' >';
858
 
@@ -910,9 +910,6 @@ global $thlinkmsggiven;
910
 
911
  $result .= '</div>';
912
 
913
- // Toggle alt/even
914
- wppa_toggle_alt();
915
-
916
  wppa_out( $result );
917
  }
918
 
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
+ * Version 8.0.00.016
9
  *
10
  */
11
 
834
  $photo_left = wppa_switch( 'thumbphoto_left' );
835
  $class_asym = 'wppa-asym-text-frame-'.$mcr.$mocc;
836
 
837
+ $style = wppa_wcs( 'wppa-box' );
838
  if ( is_feed() ) $style .= ' padding:7px;';
839
 
840
  $wid = wppa_get_cover_width( 'thumb' );
852
 
853
  $result .= "\n" . '<div' .
854
  ' id="thumb-' . $xid . '-' . $mocc . '"' .
855
+ ' class="thumb wppa-box wppa-cover-box wppa-cover-box-' . $mcr . $mocc . '"' .
856
  ' style="' . $style . '"' .
857
  ' >';
858
 
910
 
911
  $result .= '</div>';
912
 
 
 
 
913
  wppa_out( $result );
914
  }
915
 
wppa-utils.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
- * Version 8.0.00.014
7
  *
8
  */
9
 
@@ -3318,15 +3318,6 @@ static $smilies;
3318
  return $result;
3319
  }
3320
 
3321
- function wppa_toggle_alt() {
3322
- if ( wppa( 'alt' ) == 'alt' ) {
3323
- wppa( 'alt', 'even' );
3324
- }
3325
- else {
3326
- wppa( 'alt', 'alt' );
3327
- }
3328
- }
3329
-
3330
  function wppa_is_virtual() {
3331
 
3332
  if ( wppa( 'is_topten' ) ) return true;
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains low-level utility routines
6
+ * Version 8.0.00.016
7
  *
8
  */
9
 
3318
  return $result;
3319
  }
3320
 
 
 
 
 
 
 
 
 
 
3321
  function wppa_is_virtual() {
3322
 
3323
  if ( wppa( 'is_topten' ) ) return true;
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: 8.0.00.015
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/
@@ -24,7 +24,7 @@ global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
- $wppa_api_version = '8.0.00.015'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30
 
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: 8.0.00.016
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/
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
+ $wppa_api_version = '8.0.00.016'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30