File: /var/www/ippmt.kauko.lt/wp-content/plugins/wp-photo-album-plus/js/wppa-all.js
// wppa-utils
function wppaAnimate(e,a,t,p,i){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css(a),i&&setTimeout(i,10)):jQuery(e).stop().animate(a,t,p,i)}function wppaFadeIn(e,a,t){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:""}),t&&setTimeout(t,10)):jQuery(e).stop().fadeIn(a,t)}function wppaFadeOut(e,a,t){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"none"}),t&&setTimeout(t,10)):jQuery(e).stop().fadeOut(a,t)}function wppaFadeTo(e,a,t,p){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"",opacity:t}),p&&setTimeout(p,10)):jQuery(e).stop().fadeTo(a,t,p)}function wppaTrim(e,a){e=wppaTrimLeft(e,a);return e=wppaTrimRight(e,a)}function wppaTrimLeft(e,a){var t,p,i,r,n,o,s;switch(typeof a){case"string":for(p=(t=e).length,i=a.length;i<=p&&t.substr(0,i)==a;)p=(t=t.substr(i)).length;break;case"object":for(n=!1,s=e;!n;){for(r=0,o=s;r<a.length;)s=wppaTrimLeft(s,a[r]),r++;n=o==s}t=s;break;default:return e.replace(/^\s\s*/,"")}return t}function wppaTrimRight(e,a){var t,p,i,r,n,o,s;switch(typeof a){case"string":for(p=(t=e).length,i=a.length;i<=p&&t.substr(p-i)==a;)p=(t=t.substr(0,p-i)).length;break;case"object":for(n=!1,s=e;!n;){for(r=0,o=s;r<a.length;)s=wppaTrimRight(s,a[r]),r++;n=o==s}t=s;break;default:return e.replace(/\s\s*$/,"")}return t}function wppa_setCookie(e,a,t){var p=new Date;p.setDate(p.getDate()+t);p=escape(a)+(null==t?"":"; expires="+p.toUTCString());document.cookie=e+"="+p}function wppa_getCookie(e){for(var a,t,p=document.cookie.split(";"),i=0;i<p.length;i++)if(a=p[i].substr(0,p[i].indexOf("=")),t=p[i].substr(p[i].indexOf("=")+1),(a=a.replace(/^\s+|\s+$/g,""))==e)return unescape(t);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e){var a,t,p,i;"undefined"!=typeof console&&(a=(new Date).getTime()%864e5,a-=60*(t=Math.floor(a/36e5))*60*1e3,a-=60*(p=Math.floor(a/6e4))*1e3,i=Math.floor(a/1e3),console.log("At: "+t+":"+p+":"+i+"."+(a-=1e3*i)+" message: "+e))}function wppaSvgHtml(e,a,t,p,i,r,n,o){var s;switch(i=i||"0",r=r||"10",n=n||"20",o=o||"50",wppaSvgCornerStyle){case"gif":case"none":radius=i;break;case"light":radius=r;break;case"medium":radius=n;break;case"heavy":radius=o}a=a||"32px",t="Full-Screen"==e||"Exit-Full-Screen"==e?(s=wppaFsFillcolor,wppaFsBgcolor):t?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor),""==s&&(s="transparent"),""==t&&(t="transparent");var w='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 30 30" style="'+(a?"height:"+a+";":"")+"fill:"+s+";background-color:"+t+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":w+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Next-Button-Big":w+='<line x1="8" y1="2" x2="21.75" y2="15.75" stroke="'+s+'" stroke-width="2.14" /><line x1="21.75" y1="14.25" x2="8" y2="28" stroke="'+s+'" stroke-width="2.14" />';break;case"Prev-Button":w+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Prev-Button-Big":w+='<line x1="22" y1="2" x2="8.25" y2="15.75" stroke="'+s+'" stroke-width="2.14" /><line x1="8.25" y1="14.25" x2="22" y2="28" stroke="'+s+'" stroke-width="2.14" />';break;case"Pause-Button":w+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Pause-Button-New":w+='<line x1="6" y1="0" x2="6" y2="30" stroke="'+s+'" stroke-width="6" /><line x1="18" y1="0" x2="18" y2="30" stroke="'+s+'" stroke-width="6" />';break;case"Play-Button":w+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Play-Button-New":w+='<path stroke-linejoin="miter-clip" stroke-width="0.025" d="M5,0 L25,15 L5,30 z" />';break;case"Stop-Button":w+='<path d="M30,0H0V30H30V0z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-11C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h11C20.8,9,21,9.2,21,9.5V20.5z"/>';break;case"Exit":w+='<path d="M30 24.398l-8.406-8.398 8.406-8.398-5.602-5.602-8.398 8.402-8.402-8.402-5.598 5.602 8.398 8.398-8.398 8.398 5.598 5.602 8.402-8.402 8.398 8.402z"></path>';break;case"Exit-2":w+='<path d="M30,0H0V30H30V0z M9 4 L15 10 L21 4 L26 9 L20 15 L26 21 L21 26 L15 20 L9 26 L4 21 L10 15 L4 9Z" />';break;case"Exit-Big":w+='<line x1="4" y1="4" x2="26" y2="26" stroke="'+s+'" stroke-width="2.14" /><line x1="4" y1="26" x2="26" y2="4" stroke="'+s+'" stroke-width="2.14" />';break;case"Full-Screen":w+='<path d="M27.414 24.586l-4.586-4.586-2.828 2.828 4.586 4.586-4.586 4.586h12v-12zM12 0h-12v12l4.586-4.586 4.543 4.539 2.828-2.828-4.543-4.539zM12 22.828l-2.828-2.828-4.586 4.586-4.586-4.586v12h12l-4.586-4.586zM32 0h-12l4.586 4.586-4.543 4.539 2.828 2.828 4.543-4.539 4.586 4.586z"></path>';break;case"Full-Screen-2":w+='<path d="M30,0H0V30H30V0z M4 4 L12 4 L10 6 L14 10 L10 14 L6 10 L4 12Z M18 4 L26 4 L26 12 L24 10 L20 14 L16 10 L20 6Z M26 26 L18 26 L20 24 L16 20 L20 16 L24 20 L26 18Z M4 26 L4 18 L6 20 L10 16 L14 20 L10 24 L12 26Z" />';break;case"Exit-Full-Screen":w+='<path d="M24.586 27.414l4.586 4.586 2.828-2.828-4.586-4.586 4.586-4.586h-12v12zM0 12h12v-12l-4.586 4.586-4.539-4.543-2.828 2.828 4.539 4.543zM0 29.172l2.828 2.828 4.586-4.586 4.586 4.586v-12h-12l4.586 4.586zM20 12h12l-4.586-4.586 4.547-4.543-2.828-2.828-4.547 4.543-4.586-4.586z"></path>';break;case"Exit-Full-Screen-2":w+='<path d="M30,0H0V30H30V0z M17 17 L25 17 L23 19 L27 23 L23 27 L19 23 L17 25Z M5 17 L13 17 L13 25 L11 23 L7 27 L3 23 L7 19Z M13 13 L5 13 L7 11 L3 7 L7 3 L11 7 L13 5Z M17 13 L17 5 L19 7 L23 3 L27 7 L23 11 L25 13Z" />';break;default:w+='<path d="M30,0H0V30H30V0z" />'}return w+="</g></svg>"}var wppaLazyTimer,wppaLazyDone=!(wppaJsUtilsVersion="9.0.05.002"),wppaLazyLoaded=0,wppaLazyRequested=0,wppaLazyStartTime=0,wppaLazyBusy=!1,wppaLazyProcTime=0;function wppaMakeLazyVisible(e){if(wppaLazyProcTime-=Date.now(),wppaLazyLoad){if("scroll"==e)return clearTimeout(wppaLazyTimer),wppaLazyTimer=setTimeout(wppaMakeLazyVisible,wppaScrollEndDelay,"delayed"),wppaLazyBusy=!0,void(wppaLazyProcTime+=Date.now());if("resize"==e)return clearTimeout(wppaLazyTimer),wppaLazyTimer=setTimeout(wppaMakeLazyVisible,wppaResizeEndDelay,"delayed"),wppaLazyBusy=!0,void(wppaLazyProcTime+=Date.now());if("DOM"==e)return clearTimeout(wppaLazyTimer),wppaLazyTimer=setTimeout(wppaMakeLazyVisible,100,"delayed"),wppaLazyBusy=!0,void(wppaLazyProcTime+=Date.now());if(wppaLazyRequested==wppaLazyLoaded)if("delayed"==e&&(wppaLazyBusy=!1),wppaLazyBusy)wppaLazyProcTime+=Date.now();else{wppaLazyBusy=!0,0==wppaLazyStartTime&&(wppaLazyStartTime=Date.now());var a;Date.now();wppaInitMasonryPlus();for(var t=jQuery("*[data-src]"),p=[],i=0;i<t.length;)wppaIsElementInViewport(t[i])&&(p[i]=t[i]),i++;0<p.length&&jQuery(p).each(function(){wppaLazyRequested<5+wppaLazyLoaded&&(a=jQuery(this).attr("data-src"))&&(jQuery(this).attr("src",a),jQuery(this).removeAttr("data-src"),jQuery(this).parent().css({"min-height":0}),jQuery(this).parent().parent().css({"min-height":0}),wppaLazyRequested++,wppaLazyDone=!0)}),wppaLazyDone&&(wppaInitMasonryPlus(),wppaResizeNice("wppaMakeLazyVisible"),wppaDoAllAutocols()),wppaLazyBusy=wppaLazyDone=!1,wppaLazyProcTime+=Date.now(),0==t.length&&0<wppaLazyStartTime&&(wppaLazyStartTime=-1)}else wppaLazyProcTime+=Date.now()}else wppaLazyProcTime+=Date.now()}function wppaIsElementInViewport(e){if(void 0===e)return!1;if(!e)return!1;if(0==e.length)return!1;if(window.closed)return!1;if(document.hidden)return!1;for(var a=jQuery(e);a[0]&&"BODY"!=a[0].nodeName;){if("none"==jQuery(a[0]).css("display"))return!1;var t=jQuery(a[0]).css("visibility");if("hidden"==t||"collapse"==t)return!1;a=jQuery(a[0]).parent()}e instanceof jQuery&&(e=e[0]);e=e.getBoundingClientRect();return!e||(wppaIsMobile?0<e.bottom&&0<e.right&&e.left<3*screen.width&&e.top<3*screen.height:0<e.bottom&&0<e.right&&e.left<wppaWindowWidth()&&e.top<wppaWindowHeight())}function wppaSizeArea(){0<wppaAreaMaxFrac&&wppaAreaMaxFrac<1&&(jQuery(".wppa-thumb-area").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac),jQuery(".albumlist").css("max-height",wppaWindowHeight()*wppaAreaMaxFrac)),0<wppaAreaMaxFracSlide&&wppaAreaMaxFracSlide<1&&jQuery(".slidelist").css("max-height",wppaWindowHeight()*wppaAreaMaxFracSlide),0<wppaAreaMaxFracAudio&&wppaAreaMaxFracAudio<1&&jQuery(".audiolist").css("max-height",wppaWindowHeight()*wppaAreaMaxFracAudio),jQuery(".wppa-modal").css({maxHeight:.8*wppaWindowHeight()}),jQuery(".wppa-modal").each(function(){var e=(wppaWindowHeight()-jQuery(this).height())/2-24;wppaIsMobile&&(e-=24),jQuery(this).parent().parent().css({top:e})}),wppaResizeNice("wppaSizeArea"),wppaMakeLazyVisible("sizearea")}function wppaIconSize(e,a,t){t=t?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==t?a:(wppaIsMini[e]?t/2:t)+"px;"}function wppaEntityDecode(e){return e=(e=(e=(e=(e=e.split("&").join("&")).split(">").join(">")).split("<").join("<")).split(""").join('"')).split("'").join("'")}function wppaSetMaxWidthToParentWidth(e){var a=e.parentNode.clientWidth;jQuery(e).css({maxWidth:a})}function wppaWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function wppaWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}function wppaAdjustControlbar(e){var a,t;wppaOvlOpen&&(t=wppaIsFs()?(jQuery(".wppa-pctl-div-lb").css({position:"fixed",left:0,right:0,bottom:0}),screen.width):(jQuery(".wppa-pctl-div-lb").css({position:"initial"}),jQuery("#wppa-ovl-pan-container").width()),wppaIsMobile&&wppaIsFs()&&(t-=20),t<12*(parseInt(wppaOvlIconSize)+4)?0<(a=parseInt(t/12-4))&&(jQuery(".wppa-pctl-div-lb").find("svg").css({height:a,width:a}),jQuery(".wppa-pctl-div-lb").find("span").css({height:a,width:a})):(a=wppaOvlIconSize,jQuery(".wppa-pctl-div-lb").find("svg").css({height:a,width:a}),jQuery(".wppa-pctl-div-lb").find("span").css({height:a,width:a})),jQuery(".sixty").css({height:60,width:60}),jQuery(".sixty").find("svg").css({height:60,width:60}),wppaOvlIsSingle?(jQuery("#wppa-ovl-start-btn").hide(),jQuery("#wppa-ovl-stop-btn").hide()):wppaOvlRunning?(jQuery("#wppa-ovl-stop-btn").show(),jQuery("#wppa-ovl-start-btn").hide()):(jQuery("#wppa-ovl-start-btn").show(),jQuery("#wppa-ovl-stop-btn").hide()),wppaIsMobile&&wppaIsFs()?jQuery(".wppa-pctl-div-lb").css({paddingLeft:10,paddingRight:10}):jQuery(".wppa-pctl-div-lb").css({paddingLeft:0,paddingRight:0}),jQuery(".wppa-pctl-div-lb").css({visibility:"visible"})),"number"==typeof e&&(wppaHasControlbar?jQuery("#wppa-pctl-div-"+e).show():jQuery("#wppa-pctl-div-"+e).hide())}function wppaKillEvent(e){return e.preventDefault(),e.stopPropagation(),!1}function wppaServerLog(e){e&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=log&message="+e,async:!0,type:"GET",timeout:6e4,success:function(e,a,t){},error:function(e,a,t){wppaConsoleLog("wppaServerLog failed. Error = "+t+", status = "+a)}})}function wppaTimNow(){return(new Date).getTime()}function wppaShowCoords(e){e=e.getBoundingClientRect();alert("Top = "+parseInt(e.top)+", Left = "+parseInt(e.left)+", WinH = "+jQuery(window).height()+", WinW = "+jQuery(window).width()+", Scrolltop = "+jQuery(document).scrollTop())}function wppaOnWidgets(){return-1!=document.location.href.search("widgets.php")}function wppaOnPost(){return!wppaOnWidgets()}function wppaGetTinyMceContent(e){return"none"!=jQuery("#"+e).css("display")?jQuery("#"+e).val():tinymce.get(e).getContent()}function wppaStopProp(e){e.stopPropagation()}
// wppa-main
function wppaTabbyClick(){jQuery(window).trigger("resize"),jQuery(document).trigger("tabbychange"),jQuery(window).trigger("orientationchange"),wppaAdjustAllFilmstrips(wppaEasingSlide)}function wppaQRUpdate(e){wppaAjaxSetQrCodeSrc(e,"#wppa-qr-img")}function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").hide(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){jQuery(".wppa-ubb").each(function(){var e=jQuery(this).attr("id").substr(6);wppaUbb(e,"l","hide"),wppaUbb(e,"r","hide")})},3e3),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize scroll orientationchange",function(){wppaMakeLazyVisible("DOM")}),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize orientationchange",function(){wppaMakeLazyVisible("resize")}),jQuery(".wppa-divnicewrap").on("scroll wheel",function(){wppaMakeLazyVisible("scroll")}),jQuery(".wppa-box").on("scroll wheel resize",function(){wppaMakeLazyVisible("scroll")}),jQuery(".albumlist").on("scroll wheel resize",function(){wppaMakeLazyVisible("scroll")}),jQuery(".grid-masonryplus").on("scroll wheel resize",function(){wppaMakeLazyVisible("scroll")}),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaInitMasonryPlus),jQuery(window).on("resize",function(){wppaAdjustAllFilmstrips(wppaEasingSlide)}),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",function(){setTimeout(function(){wppaResizeNice("wppaDoInit"),wppaInitMasonryPlus()},1e3)}),jQuery(window).trigger("resize"),wppaProtect(),setTimeout(function(){jQuery(".responsive-tabs__heading").on("click",wppaTabbyClick),jQuery(".responsive-tabs__list__item").on("click",wppaTabbyClick)},10),jQuery(document).on("tabbychange",function(){wppaResizeNice("tabbychange"),setTimeout(function(){wppaDoAllAutocols(),jQuery(window).trigger("resize"),jQuery("#wppa-ovl-spin").hide(),wppaMakeLazyVisible("tabbychange")},1500)}),wppaOvlGlobal&&jQuery("a").each(function(){var e=jQuery(this).attr("href");e&&("jpg"!=(e=(e=e.split("."))[e.length-1])&&"jpeg"!=e&&"png"!=e||jQuery(this).attr("data-rel")||(jQuery(this).attr("data-rel",wppaOvlGlobal),jQuery(this).css("cursor","wait")))}),jQuery("div").on("touchmove",function(){wppaMakeLazyVisible("scroll")}),jQuery(".wppa-ajax-spin").css({top:wppaWindowHeight()/2,left:wppaWindowWidth()/2})}var wppaResizeNiceTimer,wppaResizeNiceTimestamp,wppaResizeEndTimer,wppaScrollEndTimer;function wppaResizeNice(e){clearTimeout(wppaResizeNiceTimer),wppaResizeNiceTimestamp=Date.now(),wppaResizeNiceTimer=setTimeout(function(){_wppaResizeNice(e)},Math.max(wppaResizeEndDelay,wppaScrollEndDelay))}function _wppaResizeNice(e){"wppaMakeLazyVisible"!=e&&"function"==typeof jQuery("body").getNiceScroll&&jQuery("body").getNiceScroll().resize(),jQuery(".wppa-nicescroll").each(function(){jQuery(this).getNiceScroll().resize()})}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(e){var p=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:p*a})})}wppaWppaVer="9.0.08.004",jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery().niceScroll&&jQuery(document).ready(function(){jQuery(".wppa-edit-area").niceScroll(".wppa-nicewrap",wppaNiceScrollOpts)})}),jQuery(document).ready(function(){wppaQRUpdate(document.location.href)}),window.onpopstate=function(e){wppaQRUpdate(document.location.href)},jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel load",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){wppaMakeLazyVisible("scroll")})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)});var wppaLastAllAutocols=0,wppaLastAllAutocolsTimer=0;function wppaDoAllAutocols(e){wppaTimNow()<wppaLastAllAutocols+200?wppaLastAllAutocolsTimer=wppaLastAllAutocolsTimer||setTimeout(wppaDoAllAutocols,200):(clearTimeout(wppaLastAllAutocolsTimer),wppaLastAllAutocols=wppaTimNow(),_wppaDoAllAutocols(0))}function _wppaDoAllAutocols(p){return jQuery(".wppa-container").each(function(){var e=jQuery(this).attr("id").substr(15);wppaAutoColumnWidth[e]&&_wppaDoAutocol(e,p)}),(p<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(p+1)},wppaExtendedResizeDelay),wppaResizeNice("wppaDoAllAutocols"),!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(e){return!1}),jQuery("video").bind("contextmenu",function(e){return!1}),jQuery("canvas").bind("contextmenu",function(e){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(e){var p,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+e,t[3]="theimg1-"+e,a=0;a<3;)1==++a&&0!=e||(p=document.getElementById(t[a]))&&"function"==typeof p.pause&&p.pause()}function wppaStopAudio(e){for(var p=jQuery(".wppa-audio-"+e),a=0;a<p.length;)p[a].pause(),a++}function wppaMakeFullsizeUrl(e){var p,a;e=(p=(e=e.replace("/thumbs/","/")).split("//"))[1]?(a=p[1].split("/"),p[0]+"//"):(a=p[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(e+="/"),e+=o),t++}return e}function wppaGetContainerWidth(e){var p=document.getElementById("wppa-container-"+e);if(p){var a=0;if(!wppaAutoColumnWidth[e])return p.clientWidth;for(;0==a;)p=p.parentNode,a=jQuery(p).width();return parseInt(a)}}function _wppaDoAutocol(e,p){if(!wppaAutoColumnWidth[e])return!0;var a,t,o=wppaGetContainerWidth(e);if(document.getElementById("wppa-container-"+e)){if(wppaCoverImageResponsive[e]||1<(a=jQuery(".wppa-asym-text-frame-"+e)).length&&(jQuery(a[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+e).css({width:o-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+e).css({width:o})):(wppaAnimate(".wppa-asym-text-frame-"+e,{width:o-wppaTextFrameDelta},wppaResponseSpeed,wppaEasingDefault),wppaAnimate(".wppa-cover-box-"+e,{width:o},wppaResponseSpeed,wppaEasingDefault))),1<(a=jQuery(".wppa-cover-box-mcr-"+e)).length){var n=document.getElementById("wppa-albumlist-"+e).clientWidth,r=parseInt((n+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,s=r-1,i=parseInt((n+wppaCoverSpacing)/r-wppaCoverSpacing);if(wppaColWidth[e]!=n||wppaMCRWidth[e]!=i){wppaColWidth[e]=n,wppaMCRWidth[e]=i;for(var l=0;l<a.length;){switch(l%r){case 0:jQuery(a[l]).css({marginLeft:"0px",clear:"both",float:"left"});break;case s:jQuery(a[l]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(a[l]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}l++}wppaCoverImageResponsive[e]||wppaAnimate(".wppa-asym-text-frame-mcr-"+e,{width:i-wppaTextFrameDelta},wppaResponseSpeed,wppaEasingDefault),jQuery(a[0]).width(),wppaAnimate(".wppa-cover-box-mcr-"+e,{width:i},wppaResponseSpeed,wppaEasingDefault)}}else 1==a.length&&(wppaCoverImageResponsive[e]||(wppaAnimate(".wppa-asym-text-frame-mcr-"+e,{width:o-wppaTextFrameDelta},wppaResponseSpeed,wppaEasingDefault),jQuery(".wppa-cover-box-mcr-"+e).css({marginLeft:"0px",float:"left"})));0<jQuery(".wppa-album-cover-grid-"+e).length&&((t=parseInt(o/wppaMaxCoverWidth+.9999))<1&&(t=1),jQuery(".wppa-album-cover-grid-"+e).css({width:100/t+"%"})),!wppaThumbSpaceAuto||(n=parseInt(jQuery(".thumbnail-frame-"+e).css("width")))&&(i=wppaMinThumbSpace,t=o-wppaThumbnailAreaDelta-7,i=Math.max(1,parseInt(t/(n+i))),i=parseInt((t-i*n)/(i+1)),jQuery(".thumbnail-frame-"+e).css({marginLeft:i})),jQuery(".thumbnail-frame-comalt-"+e).css("width",o-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+e).css("width",o-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var u,c=1,w=jQuery("#wppa-mas-h-"+c+"-"+e).attr("data-height-perc");w;)u=w*(o-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+c+"-"+e).css("height",u),c++,w=jQuery("#wppa-mas-h-"+c+"-"+e).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(e),document.getElementById("slide_frame-"+e)&&wppaFormatSlide(e),jQuery("#audio-slide-"+e).css("width",o-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+e).css("width",.7*o),_wppaAdjustFilmstrip(e,wppaEasingSlide),wppaIsMini[e]||void 0===_wppaSlides[e]||(wppaColWidth[e]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+e).html(__("Avg","wp-photo-album-plus")),jQuery("#wppa-my-rat-"+e).html(__("Mine","wp-photo-album-plus")),jQuery("#counter-"+e).html(_wppaCurIdx[e]+1+" / "+_wppaSlides[e].length)):(jQuery("#wppa-avg-rat-"+e).html(__("Average rating","wp-photo-album-plus")),jQuery("#wppa-my-rat-"+e).html(__("My rating","wp-photo-album-plus")),jQuery("#counter-"+e).html(__("Photo","wp-photo-album-plus")+" "+(_wppaCurIdx[e]+1)+" "+__("of","wp-photo-album-plus")+" "+_wppaSlides[e].length))),jQuery(".wppa-sphoto-"+e).css("width",o),jQuery(".wppa-simg-"+e).css("width",o-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+e).css("height",""),jQuery(".wppa-mphoto-"+e).css("width",o+10),jQuery(".wppa-mimg-"+e).css("width",o),jQuery(".wppa-mimg-"+e).css("height",""),jQuery(".smxpdf-"+e).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[e]&&(o/wppaSearchBoxSelItems[e]<125?jQuery(".wppa-searchsel-item-"+e).css("width","100%"):jQuery(".wppa-searchsel-item-"+e).css("width",100/wppaSearchBoxSelItems[e]+"%")),jQuery(".wppa-upload-album-"+e).css("maxWidth",.6*o),wppaSetRealCalendarHeights(e),jQuery(".wppa-box").find("select").each(function(){jQuery(this).css({maxWidth:jQuery(this).parent().width()})}),!0}}function wppaSetRealCalendarHeights(p){var a,t,o,e=jQuery("#wppa-real-calendar-"+p).width();0<e&&(a=!0,t=e*wppaThumbAspect/7,jQuery(".wppa-real-calendar-day-"+p).css({height:t}),e=e/50+2,jQuery("#wppa-real-calendar-"+p).css({fontSize:e}),e=e/4,jQuery(".wppa-real-calendar-head-td-"+p).css({marginTop:e,marginBottom:e}),o=t/2,jQuery(".wppa-realcalimg-"+p).each(function(){var e;0==this.height?a=!1:(e=jQuery(this).attr("data-day"),thisb=o-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+e+"-"+p).css({bottom:thisb}))}),a||setTimeout(function(){wppaSetRealCalendarHeights(p)},100))}function wppaSetMasHorFrameWidthsForIeAndChrome(e){for(var p=jQuery(".wppa-mas-h-"+e),a=wppaMinThumbSpace,t=0;t<p.length;t++){var o=wppaGetChildI(p[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+e+" )",400);o=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(p[t]).css({width:o})}}}function wppaGetChildI(e){for(var p=e.childNodes,a=0;a<p.length;a++){var t=p[a];if(t.id&&"i-"==t.id.substr(0,2))return t;t=wppaGetChildI(t);if(t)return t}return!1}jQuery(document).ready(function(e){jQuery(document).ready(function(){wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0)}),void 0!==history.pushState&&(wppaCanPushState=!0)});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(e,p){if(!(wppaColWidth[e]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+e).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+e).css("display","none");jQuery("#wppa-fotomoto-container-"+e).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+e).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+e)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(p),wppaFotomotoToolbarIds[e]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+e,p)):setTimeout("wppaFotomotoToolbar( "+e+',"'+p+'" )',200))}function wppaFotomotoHide(e){jQuery("#wppa-fotomoto-container-"+e).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+e).css("display","none")}function wppaStringContainsForbiddenChars(e){for(var p=["?","&","#","/",'"',"'"],a=0;a<p.length;){if(-1!=e.indexOf(p[a]))return!0;a++}return!1}function wppaPushStateSlide(e,p,a){wppaNoStackPush?wppaNoStackPush=!1:wppaIsMini[e]||wppaCanPushState&&wppaUpdateAddressLine&&""!=a&&jQuery(document).ready(function(){setTimeout(function(){try{history.pushState({type:"slide",slide:p,occur:e},"",a),wppaQRUpdate(a)}catch(e){wppaConsoleLog("Slide history stack update failed")}},1e3)})}function wppaRepairScriptTags(e){if(void 0===e)return"";for(;-1!=e.indexOf("[script");)e=e.replace("[script","<script");for(;-1!=e.indexOf("[/script");)e=e.replace("[/script","</script");return e}function wppaRepairBrTags(e){return void 0===e?"":e.replace("[br /]","<br />").replace("[a","<a").replace(/"/g,'"').replace('"]','">').replace("[/a]","</a>").replace("[img","<img").replace("/]","/>")}function wppaTrimAlt(e){return void 0===e?"":13<e.length?e.substr(0,10)+"...":e}window.onpopstate=function(e){if(wppaCanPushState&&e.state&&e.state.type){if("slide"==e.state.type)return wppaNoStackPush=!0,void _wppaGoto(e.state.occur,e.state.slide);"ajax"==e.state.type&&document.location.reload()}};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy||("undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):setTimeout("wppaFbInit()",200))}var wppaFbInitDone=!1,wppaAudioSeqno;function _wppaFbInit(){wppaFbInitDone||(FB.init({status:!0,xfbml:!0}),wppaFbInitDone=!(wppaFbInitBusy=!1))}function wppaInsertAtCursor(e,p){var a,t;document.selection?(e.focus(),sel=document.selection.createRange(),sel.text=p):e.selectionStart||"0"==e.selectionStart?(a=e.selectionStart,t=e.selectionEnd,e.value=e.value.substring(0,a)+p+e.value.substring(t,e.value.length),e.selectionStart=a+p.length,e.selectionEnd=a+p.length):e.value+=p}function wppaGeoInit(e,p,a){var t,o;document.getElementById("map-canvas-"+e)&&(p=new google.maps.LatLng(p,a),a={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:p},t=new google.maps.Map(document.getElementById("map-canvas-"+e),a),o=new google.maps.Marker({position:p,map:t,title:""}),google.maps.event.addListener(t,"center_changed",function(){window.setTimeout(function(){t.panTo(o.getPosition())},1e3)}))}function wppaEncode(e){if(void 0!==e){for(var p=(t=(t=String(e).replace(/#/g,"%23")).replace(/&/g,"%26")).split("+"),a=0,t="";a<p.length;)t+=p[a],++a<p.length&&(t+="%2B");return t}}function wppaUrlToId(e){var p=e.split("/wppa/");return 1==p.length&&(p=e.split("/upload/")),1==p.length?0:p=(p=(p=(p=(p=(p=(p=p[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(e,p){jQuery("#wppa-ss-albumopt-"+e).css("display","none"),jQuery("#wppa-ss-albumcat-"+e).css("display","none"),jQuery("#wppa-ss-albumname-"+e).css("display","none"),jQuery("#wppa-ss-albumtext-"+e).css("display","none"),jQuery("#wppa-ss-photoopt-"+e).css("display","none"),jQuery("#wppa-ss-photoname-"+e).css("display","none"),jQuery("#wppa-ss-photoowner-"+e).css("display","none"),jQuery("#wppa-ss-phototag-"+e).css("display","none"),jQuery("#wppa-ss-phototext-"+e).css("display","none"),jQuery("#wppa-ss-photoexif-"+e).css("display","none"),jQuery("#wppa-ss-photoiptc-"+e).css("display","none"),jQuery("#wppa-ss-exifopts-"+e).css("display","none"),jQuery("#wppa-ss-iptcopts-"+e).css("display","none"),jQuery("#wppa-ss-spinner-"+e).css("display","none"),jQuery("#wppa-ss-button-"+e).css("display","none");var a=jQuery("#wppa-ss-pa-"+e).val(),t="",o="",n="";switch(a){case"a":switch(jQuery("#wppa-ss-albumopt-"+e).css("display",""),t=jQuery("#wppa-ss-albumopt-"+e).val()){case"c":jQuery("#wppa-ss-albumcat-"+e).css("display","");var r=jQuery(".wppa-ss-albumcat-"+e),n="";for(s=0;s<r.length;s++)jQuery(r[s]).prop("selected")&&(n+="."+jQuery(r[s]).val());""!=(n=n.substr(1))&&jQuery("#wppa-ss-button-"+e).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+e).css("display",""),null!=(n=jQuery("#wppa-ss-albumname-"+e).val())&&jQuery("#wppa-ss-button-"+e).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+e).css("display","");r=jQuery(".wppa-ss-albumtext-"+e);for(n="",s=0;s<r.length;s++)jQuery(r[s]).prop("selected")&&(n+="."+jQuery(r[s]).val());""!=(n=n.substr(1))&&jQuery("#wppa-ss-button-"+e).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+e).css("display",""),t=jQuery("#wppa-ss-photoopt-"+e).val()){case"n":jQuery("#wppa-ss-photoname-"+e).css("display",""),null!=(n=jQuery("#wppa-ss-photoname-"+e).val())&&jQuery("#wppa-ss-button-"+e).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+e).css("display",""),null!=(n=jQuery("#wppa-ss-photoowner-"+e).val())&&jQuery("#wppa-ss-button-"+e).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+e).css("display","");r=jQuery(".wppa-ss-phototag-"+e);for(n="",s=0;s<r.length;s++)jQuery(r[s]).prop("selected")&&(n+="."+jQuery(r[s]).val());""!=(n=n.substr(1))&&jQuery("#wppa-ss-button-"+e).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+e).css("display","");var s,r=jQuery(".wppa-ss-phototext-"+e);for(n="",s=0;s<r.length;s++)jQuery(r[s]).prop("selected")&&(n+="."+jQuery(r[s]).val());""!=(n=n.substr(1))&&jQuery("#wppa-ss-button-"+e).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+e).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+e).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+e).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(e,o,"wppa-ss-iptcopts-"+e),wppaLastIptc=o):null!=(n=jQuery("#wppa-ss-iptcopts-"+e).val())&&""!=n&&jQuery("#wppa-ss-button-"+e).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+e).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+e).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+e).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(e,o,"wppa-ss-exifopts-"+e),wppaLastExif=o):null!=(n=jQuery("#wppa-ss-exifopts-"+e).val())&&""!=n&&jQuery("#wppa-ss-button-"+e).css("display","")))}}p&&(-1==(p=jQuery("#wppa-ss-pageurl-"+e).val()).indexOf("?")?p+="?":p+="&",p+="occur=1&wppa-supersearch="+a+","+t+","+o+","+n,document.location.href=p)}function wppaSetIptcExifSize(e,p){e=jQuery(e).length;6<e&&(e=6),e<2&&(e=2),jQuery(p).attr("size",e)}function wppaUpdateSearchRoot(e,p){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(e),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)p?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(p),t++}function wppaSubboxChange(e){jQuery(e).prop("checked")&&jQuery(".wppa-rootbox").each(function(e){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var e=jQuery(".wppa-display-searchstring"),p=0;p<e.length;)jQuery(e[p]).html(""),p++;for(e=jQuery(".wppa-search-sub-box"),p=0;p<e.length;)jQuery(e[p]).prop("disabled",!0),p++}function wppaEnableSubsearch(){for(var e=jQuery(".wppa-search-sub-box"),p=0;p<e.length;)jQuery(e[p]).removeAttr("disabled"),p++}function wppaDisplaySelectedFiles(e,p){var a=jQuery("#"+e),t=0,o="";for(p=p||" ";t<a[0].files.length;)o+=a[0].files[t].name+p,t++;jQuery("#"+e+"-display").val(o),jQuery("#"+e+"-display").html(o)}function wppaIsEmpty(e){return null==e||(void 0===e||(""==e||(0==e||(0==e||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce),jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(e,p,a,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(__("Processing...","wp-photo-album-plus"))},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(__("Done!","wp-photo-album-plus")),wppaUploadButtonText&&jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){var txt,txt="rest"==wppaAjaxMethod?response.responseJSON.html:(theResult=JSON.parse(response.responseText),theResult.html);-1!=txt.indexOf(__("Upload failed","wp-photo-album-plus"))?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(__("Upload failed","wp-photo-album-plus")),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+txt+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+txt+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(e,p,a){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+__("Server error.","wp-photo-album-plus")+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(__("Upload failed","wp-photo-album-plus")),wppaConsoleLog("Error = "+a+", status = "+p)}};return options}function wppaInitMasonryPlus(){jQuery(".grid-masonryplus").each(function(){var e=jQuery(this).attr("id").substr(5),p=wppaGetContainerWidth(e)-wppaThumbnailAreaDelta,a=parseInt((p+wppaTfMargin)/(.75*wppaThumbSize+wppaTfMargin));0==a&&(a=1);a=parseInt(p/a);jQuery(".grid-item").css("visibility","visible"),jQuery(".grid-item-"+e).css("width",a+"px"),jQuery("#grid-"+e).masonry({itemSelector:".grid-item-"+e,columnWidth:a,fitWidth:!0,transitionDuration:0})})}function wppaFsChange(){wppaFsShow(),wppaOvlShowSame("fschange")}function wppaGlobalFS(){if(wppaIsIpad)return!1;if(wppaIsSafari)return!1;var e=parseInt(wppaGlobalFsIconSize/4),p=e;!wppaIsMobile&&0<jQuery("#wpadminbar").length&&(e+=jQuery("#wpadminbar").height()),jQuery("body").append('<div id="wppa-fulls-btn-1" class="wppa-fulls-btn" style="position:fixed;top:'+e+"px;right:"+p+'px;display:none;" title="Enter fullscreen" onclick="wppaFsOn()" >'+wppaSvgHtml("Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),jQuery("body").append('<div id="wppa-exit-fulls-btn-1" class="wppa-exit-fulls-btn" style="position:fixed;top:'+e+"px;right:"+p+'px;display:none;" title="Leave fullscreen" onclick="wppaFsOff()" >'+wppaSvgHtml("Exit-Full-Screen",wppaGlobalFsIconSize+"px",!0,!1,"0","0","0","0")+"</div>"),wppaFsShow()}function wppaFsOn(){var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()}function wppaFsOff(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}function wppaIsFs(){return!wppaIsIpad&&(!wppaIsSafari&&null!==document.fullscreenElement)}function wppaFsShow(){wppaIsFs()?(jQuery(".wppa-fulls-btn").hide(),jQuery(".wppa-exit-fulls-btn").show()):(jQuery(".wppa-fulls-btn").show(),jQuery(".wppa-exit-fulls-btn").hide()),wppaOvlOpen&&"global"==wppaFsPolicy&&wppaOvlBigBrowse&&(jQuery("#wppa-fulls-btn-1").hide(),jQuery("#wppa-exit-fulls-btn-1").hide())}jQuery(document).ready(function(){jQuery(".wppa-ss-button").each(function(){mocc=jQuery(this).attr("data-mocc"),wppaSuperSearchSelect(mocc)})}),jQuery(document).ready(function(){jQuery(document).ready(function(){"global"==wppaFsPolicy&&wppaGlobalFS()}),jQuery(window).on("DOMContentLoaded load",wppaFsShow),jQuery(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange",wppaFsChange)});var wppaAudioOnlyRuns=[];function wppaDoAudioOnly(e,p,a,t){var o;wppaAudioSeqno=a;var n=p[0],r="";p.forEach(function(e,p){var a=e.split("."),a=a[a.length-1];r+='<source id="wppa-audio-source-'+p+"-"+t+'" src="'+e+'" type="audio/'+a+'">'}),r+="Your browser does not support the audio element.",""==(o=jQuery("#wppa-audio-source-0-"+t).attr("src"))&&(wppaAudioOnlyRuns[t]=!1),o==n&&wppaAudioOnlyRuns[t]?(document.getElementById("wppa-audioonly-"+t).pause(),wppaAudioOnlyRuns[t]=!1):(o==p[0]?document.getElementById("wppa-audioonly-"+t).play():(jQuery("#"+e).html(r),document.getElementById("wppa-audioonly-"+t).load(),document.getElementById("wppa-audioonly-"+t).play(),jQuery(".wppa-audiolabel-"+t).css("font-weight","normal"),jQuery("#audiolabel-"+t+"-"+a).css("font-weight","bold"),jQuery("#audiolabel-"+t+"-"+(a-1)).blur(),jQuery("#audiolabel-"+t+"-"+a).blur(),wppaHideAudioDesc(wppaAudioOnlyRuns[t],t,!0)),wppaShowAudioDesc(wppaAudioOnlyRuns[t]=a,t))}function wppaAudioOnlyNext(e){jQuery("#audiolabel-"+e+"-"+(wppaAudioSeqno+1)).trigger("click")}function wppaShowAudioDesc(e,p){jQuery("#"+("audiodesc-"+p+"-"+e)).show()}function wppaHideAudioDesc(e,p,a){var t;e&&(t="audiodesc-"+p+"-"+e,!a&&wppaAudioOnlyRuns[p]==e||jQuery("#"+t).hide())}var wppaAlbLbBusy=!1;function wppaAlbLb(e,p){if(e.stopPropagation(),!wppaAlbLbBusy)return wppaAlbLbBusy=!0,jQuery("#wppa-ovl-spin").show(),jQuery(".first-"+p).trigger("click"),!1;wppaAlbLbBusy=!1}
// wppa-slideshow
var wppaJsSlideshowVersion="9.0.06.002",wppaHasControlbar=!1;function wppaStoreSlideInfo(p,a,e,t,i,w,r,o,l,n,s,d,u,_,m,h,y,c,S,g,f,x,j,I,Q,b,v,T,N,C,R,k,F,L,M,H){l=wppaRepairScriptTags(l),_wppaSlides[p]&&"0"!=a||(_wppaSlides[p]=[],_wppaNames[p]=[],_wppaFilmThumbTitles[p]=[],_wppaFullNames[p]=[],_wppaDsc[p]=[],_wppaOgDsc[p]=[],_wppaCurIdx[p]=-1,_wppaNxtIdx[p]=0,wppaSavedSlideshowTimeout[p]?_wppaTimeOut[p]=wppaSavedSlideshowTimeout[p]:(_wppaTimeOut[p]=S,wppaSavedSlideshowTimeout[p]=_wppaTimeOut[p]),_wppaSSRuns[p]=!1,_wppaTP[p]=-2,_wppaFg[p]=0,_wppaIsBusy[p]=!1,_wppaFirst[p]=!0,_wppaId[p]=[],_wppaRealId[p]=[],_wppaAvg[p]=[],_wppaDisc[p]=[],_wppaMyr[p]=[],_wppaVRU[p]=[],_wppaLinkUrl[p]=[],_wppaLinkTitle[p]=[],_wppaLinkTarget[p]=[],_wppaCommentHtml[p]=[],_wppaIptcHtml[p]=[],_wppaExifHtml[p]=[],_wppaUrl[p]=[],_wppaSkipRated[p]=!1,_wppaLbTitle[p]=[],_wppaDidGoto[p]=!1,wppaSlidePause[p]=!1,_wppaShareUrl[p]=[],_wppaShareHtml[p]=[],_wppaFilmNoMove[p]=!1,_wppaHiresUrl[p]=[],_wppaIsVideo[p]=[],_wppaIsAudio[p]=[],_wppaVideoHtml[p]=[],_wppaAudioHtml[p]=[],_wppaVideoNatWidth[p]=[],_wppaVideoNatHeight[p]=[],wppaVideoPlaying[p]=!1,wppaAudioPlaying[p]=!1,_wppaWaitTexts[p]=[],_wppaImageAlt[p]=[],_wppaFilename[p]=[],_wppaPanoramaHtml[p]=[],_wppaPanControlHeight[p]=[],_wppaRatio[p]=[]),S="default",""!=h?S="pointer":""!=wppaLightBox[p]&&(S="url( "+wppaImageDirectory+wppaMagnifierCursor+" ),pointer"),_wppaIsVideo[p][a]=""!=T,_wppaIsAudio[p][a]=""!=N,_wppaIsVideo[p][a]?(_wppaSlides[p][a]=' alt="'+R+'" class="theimg theimg-'+p+' big" ',wppaSlideVideoStart&&(_wppaSlides[p][a]+=" autoplay "),0<k.length&&(_wppaSlides[p][a]+=' poster="'+k+'" ')):(_wppaIsAudio[p][a]&&(_wppaSlides[p][a]=' alt="'+R+'" class="theimg theimg-'+p+' big" ',wppaSlideAudioStart&&(_wppaSlides[p][a]+=" autoplay ")),_wppaSlides[p][a]=' src="'+e+'" alt="'+R+'" class="theimg theimg-'+p+' big stereo" '),wppaSlideSwipe&&(_wppaSlides[p][a]+=' ontouchstart="wppaTouchStart( event, this.id, '+p+' );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" '),wppaAutoColumnWidth[p]||(_wppaSlides[p][a]+='width="'+i+'" height="'+w+'" '),_wppaIsVideo[p][a]?(k="wppa"==wppaLightBox[p]?"":"controls",_wppaSlides[p][a]+='style="'+t+"; cursor:"+S+'; display:none;" '+k+" >"+T+"</video>"):_wppaSlides[p][a]+='style="'+t+"; cursor:"+S+'; display:none; vertical-align:middle;">',_wppaFullNames[p][a]='<span class="sdf-'+p+'" >'+wppaRepairBrTags(r)+"</span>",_wppaNames[p][a]='<span class="sdn-'+p+'" >'+o+"</span>",_wppaFilmThumbTitles[p][a]=o,_wppaDsc[p][a]=l,_wppaOgDsc[p][a]=b,_wppaId[p][a]=n,_wppaRealId[p][a]=s,_wppaAvg[p][a]=d,_wppaDisc[p][a]=u,_wppaMyr[p][a]=_,_wppaVRU[p][a]=m,_wppaLinkUrl[p][a]=h,_wppaLinkTitle[p][a]=y,""!=c?_wppaLinkTarget[p][a]=c:wppaSlideBlank[p]?_wppaLinkTarget[p][a]="_blank":_wppaLinkTarget[p][a]="_self",_wppaCommentHtml[p][a]=g,_wppaIptcHtml[p][a]=f,_wppaExifHtml[p][a]=x,_wppaUrl[p][a]=e,_wppaLbTitle[p][a]=wppaRepairScriptTags(j),_wppaShareUrl[p][a]=I,_wppaShareHtml[p][a]=wppaRepairScriptTags(Q),_wppaHiresUrl[p][a]=v,_wppaVideoHtml[p][a]=T,_wppaAudioHtml[p][a]=N,_wppaVideoNatWidth[p][a]=i,_wppaVideoNatHeight[p][a]=w,_wppaWaitTexts[p][a]=C,_wppaImageAlt[p][a]=R,_wppaFilename[p][a]=F,_wppaPanoramaHtml[p][a]=L,_wppaPanControlHeight[p][a]=M,_wppaRatio[p][a]=H}function wppaSpeed(p,a){_wppaSSRuns[p]&&_wppaSpeed(p,a)}function wppaStopShow(p){_wppaSSRuns[p]&&_wppaStop(p)}function wppaStopMedia(p){wppaStopAudio(p),wppaStopVideo(p),wppaStopShow(p)}function wppaStartStop(p,a){wppaSlideInitRunning[p]&&("start"==wppaSlideInitRunning[p]?a=-1:"stopprev"==wppaSlideInitRunning[p]?(a=_wppaSlides[p].length-1,_wppaStop(p)):"stopnext"==wppaSlideInitRunning[p]&&(a=0,_wppaStop(p)),wppaSlideInitRunning[p]=""),_wppaIsBusy[p]&&(_wppaTP[p]=a),_wppaSSRuns[p]?_wppaStop(p):_wppaStart(p,a),wppaIsMobile&&(jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(10,1).fadeTo(3e3,0),jQuery(".ubb-"+p).stop().fadeTo(10,1).fadeTo(3e3,0))}function wppaBbb(p,a,e){_wppaSSRuns[p]||_wppaBbb(p,a,e)}function wppaUbb(p,a,e){_wppaUbb(p,a,e)}function wppaRateIt(p,a){_wppaRateIt(p,a)}function wppaOvlRateIt(p,a,e,t){_wppaOvlRateIt(p,a,e,t)}function wppaPrev(p){wppaStopMedia(p),_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrev(p)}function wppaPrevN(p,a){wppaStopMedia(p),_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaPrevN(p,a)}function wppaFirst(p){wppaStopMedia(p),_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,0)}function wppaNext(p){wppaStopMedia(p),_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNext(p)}function wppaNextN(p,a){wppaStopMedia(p),_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaNextN(p,a)}function wppaLast(p){wppaStopMedia(p),_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,_wppaSlides[p].length-1)}function wppaFollowMe(p,a){wppaStopMedia(p),_wppaSSRuns[p]||_wppaFollowMe(p,a)}function wppaLeaveMe(p,a){wppaStopMedia(p),_wppaSSRuns[p]||_wppaLeaveMe(p,a)}function wppaGoto(p,a){wppaStopMedia(p),_wppaDidGoto[p]=!0,_wppaSSRuns[p]||_wppaGoto(p,a)}function wppaGotoFilmNoMove(p,a){wppaStopMedia(p),_wppaDidGoto[p]=!0,_wppaSSRuns[p]||(_wppaFilmNoMove[p]=!0,_wppaGoto(p,a))}function wppaGotoKeepState(p,a){wppaStopMedia(p),_wppaNxtIdx[p]!=a&&(_wppaDidGoto[p]=!0,_wppaGotoKeepState(p,a))}function _wppaGotoKeepState(p,a){(_wppaSSRuns[p]?_wppaGotoRunning:_wppaGoto)(p,a)}function wppaGotoRunning(p,a){wppaStopMedia(p),_wppaDidGoto[p]=!0,_wppaGotoRunning(p,a)}function wppaValidateComment(p){return _wppaValidateComment(p)}function _wppaNextSlide(p,a){var e=!document.getElementById("slide_frame-"+p);if(wppaLazyLoad&&!e&&!wppaIsSlidshowVisible(p)||wppaVideoPlaying[p]||wppaAudioPlaying[p])return wppaFilmInit[p]=!1,void setTimeout(function(){_wppaNextSlide(p,a)},400);if(_wppaLastIdx[p]=_wppaCurIdx[p],!document.getElementById("slide_frame-"+p)&&document.getElementById("filmwindow-"+p)&&wppaFilmonlyContinuous)return _wppaSSRuns[p]?(_wppaCurIdx[p]++,_wppaCurIdx[p]==_wppaSlides[p].length&&(_wppaCurIdx[p]=0),_wppaAdjustFilmstrip(p,"linear"),_wppaNxtIdx[p]=_wppaCurIdx[p],void setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",wppaAnimationSpeed)):(_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFilmInit[p]=!1,void _wppaAdjustFilmstrip(p,"linear"));if(document.getElementById("slide_frame-"+p)||document.getElementById("filmwindow-"+p)){var t=_wppaFg[p],e=1-t;if((wppaVideoPlaying[p]||wppaAudioPlaying[p])&&_wppaSSRuns[p])setTimeout("_wppaNextSlide( "+p+", '"+a+"' )",500);else{if("auto"==a){if(wppaSlidePause[p])return jQuery("#theimg"+t+"-"+p).attr("title",wppaSlidePause[p]),jQuery("#slide_frame-"+p).attr("title",wppaSlidePause[p]),void setTimeout("_wppaNextSlide( "+p+', "auto" )',250)}else jQuery("#slide_frame-"+p).removeAttr("title");if((_wppaSSRuns[p]||"auto"!=a)&&_wppaSlides[p]&&(!(_wppaSlides[p].length<2)||_wppaFirst[p])){if(_wppaSSRuns[p]||"reset"!=a||(_wppaSSRuns[p]=!0,__wppaOverruleRun=!1),_wppaVoteInProgress=!1,_wppaIsBusy[p]=!0,_wppaSSRuns[p]&&_wppaShowMetaData(p,"hide"),_wppaSSRuns[p]&&(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0)),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaCurIdx[p]]).css({display:"none"}),jQuery("#geodiv-"+p+"-"+_wppaId[p][_wppaNxtIdx[p]]).css({display:""}),"undefined"!=typeof _wppaLat&&_wppaLat[p]?(o=_wppaRealId[p],_wppaLat[p][o[_wppaNxtIdx[p]]]?(jQuery("#map-canvas-"+p).css("display",""),wppaGeoInit(p,_wppaLat[p][o[_wppaNxtIdx[p]]],_wppaLon[p][o[_wppaNxtIdx[p]]])):jQuery("#map-canvas-"+p).css("display","none")):jQuery("#map-canvas-"+p).css("display","none"),jQuery("[id^=wppa-numbar-"+p+"-]").css({backgroundColor:wppaBGcolorNumbar,borderColor:wppaBcolorNumbar,fontFamily:wppaFontFamilyNumbar,fontSize:wppaFontSizeNumbar,color:wppaFontColorNumbar,fontWeight:wppaFontWeightNumbar}),jQuery("#wppa-numbar-"+p+"-"+_wppaNxtIdx[p]).css({backgroundColor:wppaBGcolorNumbarActive,borderColor:wppaBcolorNumbarActive,fontFamily:wppaFontFamilyNumbarActive,fontSize:wppaFontSizeNumbarActive,color:wppaFontColorNumbarActive,fontWeight:wppaFontWeightNumbarActive}),_wppaSlides[p].length>wppaNumbarMax){var i,w,r=_wppaSlides[p].length-1,o=_wppaNxtIdx[p],l=(wppaNumbarMax-1)/2;o<l?(i=0,w=wppaNumbarMax-1-1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-l<o?(i=(w=r)-wppaNumbarMax+1+1,jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(w=o+l+.5-1,(i=o-l+1)<2?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"none"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})):r-1<w?(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"none"})):(jQuery("#wppa-nbar-"+p+"-lodots").css({display:"block"}),jQuery("#wppa-nbar-"+p+"-hidots").css({display:"block"})));for(var n=0;n<_wppaSlides[p].length;)0!=n&&n!=r&&(n<i||w<n)?jQuery("#wppa-numbar-"+p+"-"+n).css({display:"none"}):jQuery("#wppa-numbar-"+p+"-"+n).css({display:"block"}),n++}_wppaFirst[p]?(-1!=_wppaCurIdx[p]&&wppaMakeTheSlideHtml(p,"0",_wppaCurIdx[p]),wppaMakeTheSlideHtml(p,"1",_wppaNxtIdx[p]),jQuery("#imagedesc-"+p).html(_wppaDsc[p][_wppaCurIdx[p]]),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),"void"==_wppaCommentHtml[p][_wppaCurIdx[p]]?(jQuery("#wppa-comments-"+p).hide(),jQuery("#wppa-comments-"+p).html("")):(jQuery("#wppa-comments-"+p).show(),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]])),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),"icons"==wppaSlideshowNavigationType?(l=wppaIconSize(p,"1.5em",!1),jQuery("#prev-arrow-"+p).html(wppaSvgHtml("Prev-Button",l,!1,!0)),jQuery("#next-arrow-"+p).html(wppaSvgHtml("Next-Button",l,!1,!0))):wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#prev-arrow-"+p).html("« "+__("Previous","wp-photo-album-plus")),jQuery("#next-arrow-"+p).html(__("Next","wp-photo-album-plus")+" »")):(jQuery("#prev-arrow-"+p).html("« "+__("Previous photo","wp-photo-album-plus")),jQuery("#next-arrow-"+p).html(__("Next photo","wp-photo-album-plus")+" »")),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(__("Avg","wp-photo-album-plus")),jQuery("#wppa-my-rat-"+p).html(__("Mine","wp-photo-album-plus"))):(jQuery("#wppa-avg-rat-"+p).html(__("Average rating","wp-photo-album-plus")),jQuery("#wppa-my-rat-"+p).html(__("My rating","wp-photo-album-plus")))):wppaMakeTheSlideHtml(p,e,_wppaNxtIdx[p]),setTimeout("_wppaNextSlide_2( "+p+" )",10)}}}}function _wppaNextSlide_2(p){var a=_wppaFg[p],e=1-a,t=document.getElementById("theimg"+e+"-"+p);if(t&&1==t.nodeType)if("IMG"==t.nodeName){if(!t.complete)return void setTimeout("_wppaNextSlide_2( "+p+" )",200)}else if("VIDEO"==t.nodeName){if(t.readyState<4)return void setTimeout("_wppaNextSlide_2( "+p+" )",200);_wppaFirst[p]&&(jQuery(t).css({display:""}),wppaSlideVideoStart&&t.play())}_wppaFirst[p]=!1,wppaUpdateLightboxes(),jQuery("#wppa-slide-spin-"+p).hide(),-1!=_wppaSSRuns[p]&&(_wppaToTheSame||_wppaShowMetaData(p,"hide")),_wppaFg[p]=1-_wppaFg[p],_wppaFg[p],setTimeout("_wppaNextSlide_3( "+p+" )",10)}function _wppaNextSlide_3(p){var a=_wppaFg[p],e=1-a,t=_wppaCurIdx[p],i=_wppaNxtIdx[p],w="#theslide"+e+"-"+p,r="#theslide"+a+"-"+p,o="#theimg"+e+"-"+p,l="#theimg"+a+"-"+p,n=parseInt(jQuery(w).css("width")),s=t==i+1?"right":t==i-1?"left":t==i?"none":"nil";switch(t==_wppaSlides[p].length-1&&0==i&&wppaSlideWrap[p]&&(s="left"),0==t&&i==_wppaSlides[p].length-1&&wppaSlideWrap[p]&&(s="right"),"nil"==s&&(s=t<i?"left":"right"),jQuery(w).css({marginLeft:0,width:n}),jQuery(r).css({marginLeft:0,width:n}),wppaFormatSlide(p),wppaAnimationType){case"fadeafter":wppaFadeOut(o,wppaAnimationSpeed),jQuery("#theslide"+e+"-"+p).find("canvas").fadeOut(wppaAnimationSpeed),jQuery("#theslide"+e+"-"+p).find("video").fadeOut(wppaAnimationSpeed),setTimeout(wppaFadeIn(l,wppaAnimationSpeed,_wppaNextSlide_4(p)),wppaAnimationSpeed);break;case"swipe":switch(s){case"left":wppaAnimate(w,{marginLeft:-n},wppaAnimationSpeed,wppaEasingSlide),jQuery(r).css({marginLeft:n}),wppaFadeIn(l,10),wppaAnimate(r,{marginLeft:0},wppaAnimationSpeed,wppaEasingSlide,_wppaNextSlide_4(p));break;case"right":wppaAnimate(w,{marginLeft:n},wppaAnimationSpeed,wppaEasingSlide),jQuery(r).css({marginLeft:-n}),wppaFadeIn(l,10),wppaAnimate(r,{marginLeft:0},wppaAnimationSpeed,wppaEasingSlide,_wppaNextSlide_4(p));break;case"none":wppaFadeIn(l,10),setTimeout("_wppaNextSlide_4( "+p+" )",10)}break;default:wppaFadeOut(o,wppaAnimationSpeed),jQuery("#theslide"+e+"-"+p).find("canvas").fadeOut(wppaAnimationSpeed),jQuery("#theslide"+e+"-"+p).find("video").fadeOut(wppaAnimationSpeed),wppaFadeIn(l,wppaAnimationSpeed,_wppaNextSlide_4(p))}}function _wppaNextSlide_4(p){var a=_wppaFg[p],e="#theslide"+a+"-"+p;jQuery("#theslide"+(1-a)+"-"+p).css({zIndex:80}),jQuery(e).css({zIndex:81}),_wppaCurIdx[p]=_wppaNxtIdx[p],wppaFormatSlide(p),wppaIsMini[p]||wppaGetContainerWidth(p)<wppaMiniTreshold?jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length):jQuery("#counter-"+p).html(__("Photo","wp-photo-album-plus")+" "+(_wppaCurIdx[p]+1)+" "+__("of","wp-photo-album-plus")+" "+_wppaSlides[p].length),jQuery("#bc-pname-modal-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),jQuery("#bc-pname-"+p).html(_wppaNames[p][_wppaCurIdx[p]]),_wppaAdjustFilmstrip(p,wppaEasingSlide),_wppaSetRatingDisplay(p),setTimeout("_wppaNextSlide_5( "+p+" )",_wppaTextDelay)}function _wppaNextSlide_5(p){var a,e,t;if(_wppaToTheSame||(a=_wppaDsc[p][_wppaCurIdx[p]],jQuery("#imagedesc-"+p).html(a),wppaHideWhenEmpty&&(""==(i=_wppaDsc[p][_wppaCurIdx[p]])||" "==i?jQuery("#descbox-"+p).css("display","none"):jQuery("#descbox-"+p).css("display","")),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p)),"void"==_wppaCommentHtml[p][_wppaCurIdx[p]]?(jQuery("#wppa-comments-"+p).hide(),jQuery("#wppa-comments-"+p).html("")):(jQuery("#wppa-comments-"+p).show(),jQuery("#wppa-comments-"+p).html(_wppaCommentHtml[p][_wppaCurIdx[p]])),jQuery("#iptc-"+p).html(_wppaIptcHtml[p][_wppaCurIdx[p]]),jQuery("#exif-"+p).html(_wppaExifHtml[p][_wppaCurIdx[p]]),jQuery("#wppa-share-"+p).html(_wppaShareHtml[p][_wppaCurIdx[p]])),_wppaToTheSame=!1,wppaThumbPageSize?wppaThumbPage[p]=parseInt(((0|wppaSlideOffset[p])+_wppaCurIdx[p])/wppaThumbPageSize)+1:wppaThumbPage[p]=1,_wppaSSRuns[p]&&!wppaSlideWrap[p]&&_wppaCurIdx[p]+1==_wppaSlides[p].length)return _wppaIsBusy[p]=!1,void _wppaStop(p);if(_wppaShowMetaData(p,"show"),-2!=_wppaTP[p]){var i=_wppaTP[p];return _wppaTP[p]=-2,_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),_wppaDoAutocol(p,"next_5"),void wppaStartStop(p,i)}wppaUpdateLightboxes(),wppaIsMini[p]||(e=_wppaShareUrl[p][_wppaCurIdx[p]],"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(_wppaShareUrl[p][_wppaCurIdx[p]]),1<_wppaSlides[p].length&&wppaPushStateSlide(p,_wppaCurIdx[p],e)),_wppaSSRuns[p]&&(_wppaCurIdx[p]+1==_wppaSlides[p].length?(e=jQuery("#wppa-next-pagelink-"+p),t=jQuery("#wppa-first-pagelink-"+p),0<e.length&&"hidden"!=jQuery(e).css("visibility")?setTimeout(function(){wppaSlideInitRunning[p]="start",jQuery("#wppa-next-pagelink-"+p).trigger("click")},wppaGetSlideshowTimeout(p,"next page trigger")):0<t.length?setTimeout(function(){jQuery(t).trigger("click")},wppaGetSlideshowTimeout(p,"first page trigger")):wppaSlideTimer[p]=setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p,"just wait for next in current(1)"))):wppaSlideTimer[p]=setTimeout("_wppaNextSlide( "+p+', "auto" )',wppaGetSlideshowTimeout(p,"just wait for next in current(2)"))),jQuery(document).trigger("glossaryTooltipReady"),_wppaDidGoto[p]=!1,_wppaIsBusy[p]=!1,wppaIsMini[p]||_bumpViewCount(_wppaId[p][_wppaCurIdx[p]]),wppaProtect(),"none"==jQuery("#wppa-overlay-bg").css("display")&&jQuery(window).trigger("resize"),wppaHasControlbar||jQuery("#wppa-pctl-div-"+p).hide()}function wppaFormatSlide(p){var a="theimg"+_wppaFg[p]+"-"+p,e=document.getElementById(a);if(e){var t="theslide"+_wppaFg[p]+"-"+p,i="slide_frame-"+p,w=wppaGetContainerWidth(p);wppaColWidth[p]=w;var r=jQuery(".wppa-audio-"+p),o=e.naturalWidth;void 0===o&&(o=parseInt(e.style.maxWidth));var l=e.naturalHeight;void 0===l&&(l=parseInt(e.style.maxHeight));var n=wppaAspectRatio[p],s=wppaFullSize[p],d=wppaFullFrameDelta[p],u=wppaPortraitOnly[p],_=wppaFullValign[p];void 0===_&&(_="none");var m=wppaFullHalign[p];void 0===m&&(m="none");var h,y,c,S,g,f,e=wppaStretch;if(u)h=w-d,c=0,j=S=w,f=g=(y=parseInt(h*l/o))+d,jQuery("#"+i).css({width:j,height:f}),jQuery("#"+t).css({width:S,height:g}),jQuery("#"+a).css({width:h,height:y});else{if(s<(j=w)&&(j=s),S=j,g=f=parseInt(j*n),e||j-d<=o||f-d<=l?n<(l+d)/(o+d)?(y=f-d,h=parseInt(y*o/l)):(h=j-d,y=parseInt(h*l/o)):(h=o,y=l),"default"!=_&&"none"!=_){switch(_){case"top":c=0;break;case"center":c=parseInt((f-(y+d))/2);break;case"bottom":c=f-(y+d);break;case"fit":c=0,g=f=y+d}jQuery("#"+a).css({marginTop:c,marginBottom:0})}if(jQuery("#"+i).css({width:j,height:f}),jQuery("#"+t).css({width:S,height:g}),jQuery("#"+a).css({width:h,height:y}),"default"!=_&&"none"!=_&&"none"!=m&&"default"!=m)switch(m){case"left":jQuery("#"+a).css({marginLeft:0,marginRight:"auto"});break;case"center":jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"});break;case"right":jQuery("#"+a).css({marginLeft:"auto",marginRight:0});break;default:jQuery("#"+a).css({marginLeft:"auto",marginRight:"auto"})}var m=jQuery(r).height(),x=(j-h)/2;m&&0<m&&(wppaAudioHeight=m,jQuery(r).css({height:wppaAudioHeight,width:h,left:x}))}x=_wppaHiresUrl[p][_wppaCurIdx[p]]||"";".pdf"==x.substr(x.length-4,x.length)&&jQuery("#"+t).css({width:"100%",height:"100%"});var j=parseInt(j/3);jQuery("#bbb-"+p+"-l").css({width:j}),jQuery("#bbb-"+p+"-r").css({width:j})}}function wppaMakeNameHtml(p){return _wppaCurIdx[p]<0?"":"void"==_wppaFullNames[p][_wppaCurIdx[p]]?(jQuery("#namebox-"+p).hide(),""):(jQuery("#namebox-"+p).show(),wppaRepairBrTags(_wppaFullNames[p][_wppaCurIdx[p]]))}function wppaVideoSlideOnPause(p,a){p.ended?wppaVideoPlaying[a]=!1:wppaSlideVideoPauseStop&&4==p.readyState&&0<p.played.length&&0<p.played.end(0)&&(_wppaStop(a),wppaVideoPlaying[a]=!1)}function wppaMakeTheSlideHtml(p,a,e){var t,i,w=_wppaIsVideo[p][e]?"video":"img",r="title";"wppa"==wppaLightBox[p]&&(r="data-lbtitle");var o,l,n=' onpause="wppaVideoSlideOnPause(this,'+p+');" onplay="wppaVideoPlaying['+p+'] = true;"',s=0<_wppaPanoramaHtml[p][e].length;if(wppaHasControlbar=s,jQuery("body").trigger("quitimage",[p]),s){t=_wppaPanoramaHtml[p][e].replace(/title=""/g,""),jQuery("#theslide"+(1-a)+"-"+p).html(""),jQuery("#theslide"+a+"-"+p).html(t);s=wppaGetContainerWidth(p)*wppaAspectRatio[p];jQuery("#slide_frame-"+p).css({height:s})}else{if(l=".pdf"==(o=_wppaHiresUrl[p][e]||"").substr(o.length-4,o.length),""!=_wppaLinkUrl[p][e])t=wppaSlideToFullpopup?'<a onclick="wppaStopAudio();wppaStopShow('+p+");"+_wppaLinkUrl[p][e]+'" target="'+_wppaLinkTarget[p][e]+'" title="'+_wppaLinkTitle[p][e]+'">'+(l?"<iframe "+n+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+n+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e])+"</a>":"<a onclick=\"_bumpClickCount('"+_wppaId[p][e]+"');wppaStopAudio();wppaStopShow("+p+");window.open('"+_wppaLinkUrl[p][e]+"', '"+_wppaLinkTarget[p][e]+'\');" title="'+_wppaLinkTitle[p][e]+'">'+(l?"<iframe "+n+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+n+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e])+"</a>";else if(""==wppaLightBox[p])t=l?"<iframe "+n+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+n+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e];else{for(var d="",u=0,_=wppaLightboxSingle[p]?"":"[slide-"+p+"-"+a+"]";u<e;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][u]:wppaMakeFullsizeUrl(_wppaUrl[p][u]),l=".pdf"==(o=_wppaHiresUrl[p][u]||"").substr(o.length-4,o.length),d+='<a href="'+i+'"'+(_wppaIsVideo[p][u]?' data-videonatwidth="'+_wppaVideoNatWidth[p][u]+'" data-videonatheight="'+_wppaVideoNatHeight[p][u]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][u])+'"':"")+(l?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][u]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][u])+'"':"")+" "+r+'="'+_wppaLbTitle[p][u]+'" '+wppaRel+'="'+wppaLightBox[p]+_+'"></a>',u++;for(i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][e]:wppaMakeFullsizeUrl(_wppaUrl[p][e]),l=".pdf"==(o=_wppaHiresUrl[p][e]).substr(o.length-4,o.length),d+='<a href="'+i+'"'+(' onclick="wppaStopAudio();wppaStopShow('+p+');"')+' style="cursor:pointer;" target="'+_wppaLinkTarget[p][e]+'"'+(_wppaIsVideo[p][u]?' data-videonatwidth="'+_wppaVideoNatWidth[p][e]+'" data-videonatheight="'+_wppaVideoNatHeight[p][e]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][e])+'"':"")+(l?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][u]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][e])+'"':"")+" "+r+'="'+_wppaLbTitle[p][e]+'" '+wppaRel+'="'+wppaLightBox[p]+_+'">'+(l?"<iframe "+n+' src="'+o+'" title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" style="width:100%;height:100%;" ></iframe>':"<"+w+n+' title="'+_wppaLinkTitle[p][e]+'" id="theimg'+a+"-"+p+'" '+_wppaSlides[p][e])+"</a>",u=e+1;u<_wppaUrl[p].length;)i=wppaOvlHires||"wppa"!=wppaLightBox[p]?_wppaHiresUrl[p][u]:wppaMakeFullsizeUrl(_wppaUrl[p][u]),l=".pdf"==(o=_wppaHiresUrl[p][u]).substr(o.length-4,o.length),d+='<a href="'+i+'"'+(_wppaIsVideo[p][u]?' data-videonatwidth="'+_wppaVideoNatWidth[p][u]+'" data-videonatheight="'+_wppaVideoNatHeight[p][u]+'" data-videohtml="'+encodeURI(_wppaVideoHtml[p][u])+'"':"")+(l?" data-pdfhtml=\"src='"+o+"'\"":"")+(""!=_wppaAudioHtml[p][u]?' data-audiohtml="'+encodeURI(_wppaAudioHtml[p][u])+'"':"")+" "+r+'="'+_wppaLbTitle[p][u]+'" '+wppaRel+'="'+wppaLightBox[p]+_+'"></a>',u++;t=d}""!=_wppaAudioHtml[p][e]&&(t+='<audio controls id="wppa-audio-'+_wppaId[p][e]+"-"+p+'" class="wppa-audio-'+p+" wppa-audio-"+_wppaId[p][e]+"-"+p+'" data-from="wppa"'+(wppaSlideAudioStart&&""==wppaLightBox[p]?" autoplay":"")+' onplay="wppaAudioPlaying['+p+'] = true;" onpause="wppaAudioPlaying['+p+'] = false" style="position:relative;top:-'+(wppaAudioHeight+wppaSlideBorderWidth)+"px;z-index:10;width:"+_wppaVideoNatWidth[p][e]+'px;padding:0;box-sizing:border-box;" >'+_wppaAudioHtml[p][e]+"</audio>"),t=t.replace(/title=""/g,""),jQuery("#theslide"+a+"-"+p).html(t)}}function wppaAdjustAllFilmstrips(p){jQuery(".wppa-filmstrip").each(function(){_wppaAdjustFilmstrip(jQuery(this).attr("id").substr(15),p)})}var wppaLastAnimFilmLoc=[];function _wppaAdjustFilmstrip(p,a){if("linear"!=a&&(a=wppaEasingSlide),document.getElementById("wppa-filmstrip-"+p)&&_wppaSlides[p]){var e,t,i,w,r=!document.getElementById("slide_frame-"+p);if(wppaLastAnimFilmLoc[p]||(wppaLastAnimFilmLoc[p]=0),r){var o=jQuery("#wppa-filmstrip-"+p);if(!wppaIsElementInViewport(o))return}if(r||(jQuery(".wppa-film-"+p).find("img").removeClass("wppa-filmthumb-active"),jQuery(".wppa-film-"+p).find("canvas").removeClass("wppa-filmthumb-active")),_wppaFilmNoMove[p]&&wppaFilmInit[p]?_wppaFilmNoMove[p]=!1:(wppaFilmWindowLen=wppaGetContainerWidth(p)-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).width(wppaFilmWindowLen),e=wppaFilmWindowLen/2-(_wppaCurIdx[p]+.5+wppaPreambule[p])*wppaThumbnailPitch[p]-wppaFilmStripMargin[p],wppaFilmShowGlue&&(e-=2*wppaFilmStripMargin[p]+2),i=e+wppaThumbnailPitch[p],w=e-wppaThumbnailPitch[p],t=wppaAnimationSpeed,wppaFilmInit[p]||(t=1),0==_wppaCurIdx[p]&&_wppaLastIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+"px"}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e},t,a),wppaLastAnimFilmLoc[p]=e)):0==_wppaLastIdx[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1?(jQuery("#wppa-filmstrip-"+p).css({marginLeft:w}),wppaLastAnimFilmLoc[p]!=e&&(wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e},t,a),wppaLastAnimFilmLoc[p]=e)):(o=parseInt(jQuery("#wppa-filmstrip-"+p).css("margin-left")),i=parseInt(e),w=wppaThumbnailPitch[p],_wppaSSRuns[p]?(o<i?2:i<o-2*w?1:0)&&jQuery("#wppa-filmstrip-"+p).css({marginLeft:i+w}):(i<o-1.5*w||o+1.5*w<i)&&jQuery("#wppa-filmstrip-"+p).css({marginLeft:i}),wppaAnimate("#wppa-filmstrip-"+p,{marginLeft:e},t,a),wppaLastAnimFilmLoc[p]=e,wppaFilmInit[p]=!0),_wppaLastIdx[p]=_wppaCurIdx[p]),wppaMakeLazyVisible("filmstrip"),!r&&-1!=_wppaCurIdx[p]){_wppaCurIdx[p];_wppaCurIdx[p]+10>_wppaSlides[p].length&&_wppaSlides[p].length;for(var l=0;l<_wppaSlides[p].length;)jQuery("#film_wppatnf_"+_wppaId[p][l]+"_"+p).html()&&(""!=jQuery("#wppa-film-"+l+"-"+p).attr("data-title")?(jQuery("#wppa-film-"+l+"-"+p).attr("title",jQuery("#wppa-film-"+l+"-"+p).attr("data-title")),jQuery("#wppa-pre-"+l+"-"+p).attr("title",jQuery("#wppa-film-"+l+"-"+p).attr("data-title"))):""!=wppaFilmThumbTitle&&_wppaCurIdx[p]==l?(jQuery("#wppa-film-"+l+"-"+p).attr("title",wppaFilmThumbTitle),jQuery("#wppa-pre-"+l+"-"+p).attr("title",wppaFilmThumbTitle)):(jQuery("#wppa-film-"+l+"-"+p).attr("title",wppaClickToView+" "+_wppaFilmThumbTitles[p][l]),jQuery("#wppa-pre-"+l+"-"+p).attr("title",wppaClickToView+" "+_wppaFilmThumbTitles[p][l]))),l++}r||(jQuery("#film_wppatnf_"+_wppaId[p][_wppaCurIdx[p]]+"_"+p).find("img").addClass("wppa-filmthumb-active"),jQuery("#film_wppatnf_"+_wppaId[p][_wppaCurIdx[p]]+"_"+p).find("canvas").addClass("wppa-filmthumb-active"))}}function _wppaNext(p){var a,e;!wppaSlideWrap[p]&&_wppaCurIdx[p]==_wppaSlides[p].length-1||(_wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length?(a=jQuery("#wppa-next-pagelink-"+p),e=jQuery("#wppa-first-pagelink-"+p),0<a.length&&"hidden"!=jQuery(a).css("visibility")?(wppaSlideInitRunning[p]=_wppaSSRuns[p]?"start":"stopnext",jQuery("#wppa-next-pagelink-"+p).trigger("click")):0<e.length?(wppaSlideInitRunning[p]=_wppaSSRuns[p]?"start":"stopnext",jQuery(e).trigger("click")):_wppaNextSlide(p,_wppaNxtIdx[p]=0)):_wppaNextSlide(p,0))}function _wppaNextN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]>=_wppaSlides[p].length-a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]+a;_wppaNxtIdx[p]>=_wppaSlides[p].length;)_wppaNxtIdx[p]-=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaNextOnCallback(p){if(wppaSlideWrap[p]||_wppaCurIdx[p]!=_wppaSlides[p].length-1){if(_wppaSkipRated[p]){var a=_wppaCurIdx[p]+1;a==_wppaSlides[p].length&&(a=0);var e=a;if(0!=_wppaMyr[p][e]){for(++a==_wppaSlides[p].length&&(a=0);a!=e&&0!=_wppaMyr[p][a];)++a==_wppaSlides[p].length&&(a=0);e=a}_wppaNxtIdx[p]=e}else _wppaNxtIdx[p]=_wppaCurIdx[p]+1,_wppaNxtIdx[p]==_wppaSlides[p].length&&(_wppaNxtIdx[p]=0);_wppaNextSlide(p,0)}}function _wppaPrev(p){!wppaSlideWrap[p]&&0==_wppaCurIdx[p]||(_wppaNxtIdx[p]=_wppaCurIdx[p]-1,_wppaNxtIdx[p]<0?jQuery("#wppa-prev-page-last-item-"+p).length?(wppaSlideInitRunning[p]=_wppaSSRuns[p]?"start":"stopprev",jQuery("#wppa-prev-page-last-item-"+p).trigger("click")):(_wppaNxtIdx[p]+=_wppaSlides[p].length,_wppaNextSlide(p,0)):_wppaNextSlide(p,0))}function _wppaPrevN(p,a){if(wppaSlideWrap[p]||!(_wppaCurIdx[p]<a)){for(_wppaNxtIdx[p]=_wppaCurIdx[p]-a;_wppaNxtIdx[p]<0;)_wppaNxtIdx[p]+=_wppaSlides[p].length;_wppaNextSlide(p,0)}}function _wppaGoto(p,a){_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,_wppaNextSlide(p,0)}function _wppaGotoRunning(p,a){_wppaIsBusy[p]?setTimeout("_wppaGotoRunning( "+p+","+a+" )",10):(_wppaSSRuns[p]=!1,_wppaToTheSame=_wppaNxtIdx[p]==a,_wppaNxtIdx[p]=a,__wppaOverruleRun=!0,_wppaNextSlide(p,"manual"),_wppaGotoContinue(p))}function _wppaGotoContinue(p){_wppaIsBusy[p]?setTimeout("_wppaGotoContinue( "+p+" )",10):setTimeout("_wppaNextSlide( "+p+', "reset" )',wppaGetSlideshowTimeout(p,"_wppaGotoContinue")+10)}function _wppaStart(p,a){_wppaSSRuns[p]||(("icons"==wppaSlideshowNavigationType?_wppaStartIcons:_wppaStartText)(p,a),_wppaSSRuns[p]&&(wppaStartStopNew?jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Pause-Button-New",wppaIconSize(p,wppaIsMini[p]?"24px":"48px",!0),!1,!0,"0","0","0","0")):jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Pause-Button",wppaIconSize(p,wppaIsMini[p]?"24px":"48px",!0),!1,!0,"0","10","50","50"))),-1==a&&setTimeout(function(){_wppaStart(p,a)},200))}var wppaVeryFirst=!0;function _wppaStartIcons(p,a){if(0<jQuery("#filmwindow-"+p).length&&0==jQuery("#slide_frame-"+p).length&&(wppaVeryFirst=!1),-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}var t=wppaIconSize(p,"1.5em",!1);-1<a?(jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(wppaVeryFirst||(_wppaSSRuns[p]=!0),_wppaNextSlide(p,0),wppaVeryFirst&&(_wppaSSRuns[p]=!0),jQuery("#startstop-"+p).html(wppaSvgHtml("Pause-Button",t,!1,!0,"0","10","20","50")),jQuery("#speed0-"+p).show(),jQuery("#speed1-"+p).show(),_wppaShowMetaData(p,"hide"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(__("Slideshow","wp-photo-album-plus"))),wppaVeryFirst=!1,_wppaSetRatingDisplay(p)}function _wppaStartText(p,a){if(0<jQuery("#filmwindow-"+p).length&&0==jQuery("#slide_frame-"+p).length&&(wppaVeryFirst=!1),-2==a){var e=0;if(a=0,_wppaSkipRated[p]=!0,0!=_wppaMyr[p][e])for(;e<_wppaSlides[p].length;)0==a&&0==_wppaMyr[p][e]&&(a=e),e++}-1<a?(jQuery("#startstop-"+p).html(__("Start","wp-photo-album-plus")+" "+__("Slideshow","wp-photo-album-plus")),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaNxtIdx[p]=a,_wppaCurIdx[p]=a,_wppaNextSlide(p,0),_wppaShowMetaData(p,"show")):(wppaVeryFirst||(_wppaSSRuns[p]=!0),_wppaNextSlide(p,0),wppaVeryFirst&&(_wppaSSRuns[p]=!0),jQuery("#startstop-"+p).html(__("Stop","wp-photo-album-plus")),jQuery("#speed0-"+p).css("display","inline"),jQuery("#speed1-"+p).css("display","inline"),_wppaShowMetaData(p,"hide"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(__("Slideshow","wp-photo-album-plus"))),wppaVeryFirst=!1,_wppaSetRatingDisplay(p)}var wppaSlideTimer=[];function _wppaStop(p){clearTimeout(wppaSlideTimer[p]),("icons"==wppaSlideshowNavigationType?_wppaStopIcons:_wppaStopText)(p),wppaStartStopNew?jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Play-Button-New",wppaIconSize(p,wppaIsMini[p]?"30px":"60px",!0),!1,!0,"0","0","0","0")):jQuery("#wppa-startstop-icon-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,wppaIsMini[p]?"24px":"48px",!0),!1,!0,"0","10","50","50"))}function _wppaStopIcons(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(wppaSvgHtml("Play-Button",wppaIconSize(p,"1.5em",!1),!1,!0)),jQuery("#speed0-"+p).hide(),jQuery("#speed1-"+p).hide(),_wppaShowMetaData(p,"show"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaStopText(p){_wppaSSRuns[p]=!1,jQuery("#startstop-"+p).html(__("Start","wp-photo-album-plus")+" "+__("Slideshow","wp-photo-album-plus")),jQuery("#speed0-"+p).css("display","none"),jQuery("#speed1-"+p).css("display","none"),_wppaShowMetaData(p,"show"),(jQuery("#bc-pname-modal-"+p)?jQuery("#bc-pname-modal-"+p):jQuery("#bc-pname-"+p)).html(_wppaNames[p][_wppaCurIdx[p]])}function _wppaSpeed(p,a){"random"!=_wppaTimeOut[p]&&(a?500<_wppaTimeOut[p]&&(_wppaTimeOut[p]/=1.5):_wppaTimeOut[p]<6e4&&(_wppaTimeOut[p]*=1.5),wppaSavedSlideshowTimeout[p]=_wppaTimeOut[p])}function _wppaUnloadSpinner(p){jQuery("#wppa-slide-spin-"+p).hide(),setTimeout(function(){jQuery("#wppa-slide-spin-"+p).stop().fadeOut()},1e3)}function _wppaSetRatingDisplay(p){if(document.getElementById("wppa-rating-"+p)){var a,e,t=_wppaAvg[p][_wppaCurIdx[p]];if(void 0!==t){if("likes"==wppaRatingDisplayType){"void"==(e=_wppaMyr[p][_wppaCurIdx[p]])?(jQuery("#wppa-dislike-imgdiv-"+p).hide(),jQuery("#wppa-like-imgdiv-"+p).hide()):(jQuery("#wppa-dislike-imgdiv-"+p).show(),jQuery("#wppa-like-imgdiv-"+p).show());var w=t.split("|");return jQuery("#wppa-like-"+p).attr("title",w[0]),jQuery("#wppa-liketext-"+p).html(w[1]),void("1"==_wppaMyr[p][_wppaCurIdx[p]]?jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+p).attr("src",wppaImageDirectory+"thumbup.png"))}if(t=(a=t.split("|"))[0],w=a[1],a=_wppaDisc[p][_wppaCurIdx[p]],e=_wppaMyr[p][_wppaCurIdx[p]],"void"==a)jQuery("#wppa-rating-"+p).hide();else{if(jQuery("#wppa-rating-"+p).show(),"graphic"==wppaRatingDisplayType)_wppaSetRd(p,t,"#wppa-avg-"),_wppaSetRd(p,e,"#wppa-rate-"),0==e?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),document.getElementById("wppa-dislike-"+p)&&jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).stop().fadeTo(100,wppaStarOpacity),jQuery("#wppa-filler-"+p).attr("title",a));else{if(jQuery("#wppa-numrate-avg-"+p).html(t+" ( "+w+" ) "),jQuery(".wppa-my-rat-"+p).show(),"void"==e)jQuery("#wppa-numrate-mine-"+p).html(""),jQuery(".wppa-my-rat-"+p).hide();else if(wppaRatingOnce&&0<e)jQuery("#wppa-numrate-mine-"+p).html(e);else if(e<0)jQuery("#wppa-numrate-mine-"+p).html(" dislike");else{var r="";for(i=1;i<=wppaRatingMax;i++)e==i?r+='<span class="wppa-rating-numeric-mine" style="cursor:pointer; font-weight:bold;" onclick="_wppaRateIt( '+p+", "+i+' )"> '+i+" </span>":(e>i-1&&e<i&&(r+=" ( "+e+" ) "),r+='<span class="wppa-rating-numeric" style="cursor:pointer;" onclick="_wppaRateIt( '+p+", "+i+' )" onmouseover="this.style.fontWeight=\'bold\'" onmouseout="this.style.fontWeight=\'normal\'" > '+i+" </span>");jQuery("#wppa-numrate-mine-"+p).html(r)}0==e?(jQuery("#wppa-dislike-"+p).css("display","inline"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","inline"),jQuery("#wppa-filler-"+p).css("display","none"),jQuery("#wppa-dislike-"+p).stop().fadeTo(100,wppaStarOpacity)):(jQuery("#wppa-dislike-"+p).css("display","none"),jQuery("#wppa-dislike-imgdiv-"+p).css("display","none"),jQuery("#wppa-filler-"+p).css("display","inline")),jQuery("#wppa-discount-"+p).html(a+"• "),jQuery("#wppa-filler-"+p).css("display","none")}0==e?jQuery("#wppa-vote-button-"+p).val(wppaVoteForMe):jQuery("#wppa-vote-button-"+p).val(wppaVotedForMe),jQuery("#wppa-vote-count-"+p).html(w)}}}}function wppaGetDislikeText(p,a,e){return p}function _wppaSetRd(p,a,e){var t=parseInt(a),i=t+1,w=wppaStarOpacity+(a-t)*(1-wppaStarOpacity),r=wppaRatingMax;if("void"==a)jQuery("#wppa-my-rat-"+p).hide(),jQuery(".wppa-my-rat-"+p).hide(),jQuery(".wppa-rate-"+p).hide(),jQuery(".wppa-ratingthumb").hide(),jQuery("#wppa-numrate-mine-"+p).hide();else for(jQuery("#wppa-my-rat-"+p).show(),jQuery(".wppa-my-rat-"+p).show(),jQuery(".wppa-rate-"+p).show(),jQuery(".wppa-ratingthumb").show(),jQuery("#wppa-numrate-mine-"+p).show(),idx=1;idx<=r;idx++)"#wppa-rate-"!=e&&".wppa-rate-"!=e||jQuery(e+p+"-"+idx).attr("src")!=wppaImageDirectory+"star.ico"&&jQuery(e+p+"-"+idx).attr("src",wppaImageDirectory+"star.ico"),idx<=t?jQuery(e+p+"-"+idx).stop().fadeTo(100,1):idx==i?jQuery(e+p+"-"+idx).stop().fadeTo(100,w):jQuery(e+p+"-"+idx).stop().fadeTo(100,wppaStarOpacity)}function _wppaFollowMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,a,"#wppa-rate-")}function wppaOvlFollowMe(p,a,e){e||_wppaSetRd(p,a,".wppa-rate-")}function _wppaLeaveMe(p,a){_wppaSSRuns[p]||0!=_wppaMyr[p][_wppaCurIdx[p]]&&wppaRatingOnce||_wppaMyr[p][_wppaCurIdx[p]]<0||_wppaVoteInProgress||_wppaSetRd(p,_wppaMyr[p][_wppaCurIdx[p]],"#wppa-rate-")}function wppaOvlLeaveMe(p,a,e){_wppaSetRd(p,e,".wppa-rate-")}function _wppaValidateComment(p,a){if(a=a||_wppaId[p][_wppaCurIdx[p]],jQuery("#wppa-comname-"+p).val().length<1)return alert(__("Please enter your name","wp-photo-album-plus")),!1;if("required"==wppaEmailRequired||"optional"==wppaEmailRequired){var e=jQuery("#wppa-comemail-"+p).val();if("optional"==wppaEmailRequired&&0==e.length)return!0;var t=e.indexOf("@"),a=e.lastIndexOf(".");if(t<1||a<t+2||a+2>=e.length)return alert(__("Please enter a valid email address","wp-photo-album-plus")),!1}return!(jQuery("#wppa-comment-"+p).val().length<1)||(alert(__("Please enter a comment","wp-photo-album-plus")),!1)}function _wppaGo(p){document.location=p}function _wppaBbb(p,a,e){if(!_wppaSSRuns[p]){var t="#bbb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",__("Previous photo","wp-photo-album-plus")),"r"==a&&jQuery(t).attr("title",__("Next photo","wp-photo-album-plus")),jQuery(".wppa-bbb-"+p).css("cursor","pointer");break;case"hide":jQuery(".wppa-bbb-"+p).removeAttr("title"),jQuery(".wppa-bbb-"+p).css("cursor","default");break;case"click":"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}}function _wppaUbb(p,a,e){var t="#ubb-"+p+"-"+a;switch(e){case"show":"l"==a&&jQuery(t).attr("title",__("Previous photo","wp-photo-album-plus")),"r"==a&&jQuery(t).attr("title",__("Next photo","wp-photo-album-plus")),jQuery(".ubb-"+p).css("cursor","pointer"),jQuery(".ubb-"+p).stop().fadeTo(200,.8),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,.8);break;case"hide":jQuery(".ubb-"+p).removeAttr("title"),jQuery(".ubb-"+p).css("cursor","default"),wppaIsMobile?jQuery(".ubb-"+p).stop().fadeTo(200,.1):jQuery(".ubb-"+p).stop().fadeTo(200,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,0);break;case"click":wppaIsMobile&&(jQuery(".ubb-"+p).stop().fadeTo(200,1).fadeTo(1e3,0),jQuery("#wppa-startstop-icon-"+p).stop().fadeTo(200,1).fadeTo(1e3,0)),"l"==a&&wppaPrev(p),"r"==a&&wppaNext(p);break;default:alert("Unimplemented instruction: "+e+" on: "+t)}}function wppaOpenComments(p){_wppaSSRuns[p]&&_wppaStop(p),jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none"),wppaColWidth[p]=0,setTimeout("_wppaDoAutocol( "+p+" )",100)}function _wppaShowMetaData(p,a){_wppaSlides[p]&&(_wppaSSRuns[p]||__wppaOverruleRun?"show"==a?wppaFotomotoHideWhenRunning||wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]]):wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display","none"):"show"==a?(wppaAutoOpenComments&&(jQuery("#wppa-comtable-wrap-"+p).css("display","block"),jQuery("#wppa-comform-wrap-"+p).css("display","block"),jQuery("#wppa-comfooter-wrap-"+p).css("display","none")),0!=_wppaCurIdx[p]&&jQuery(".wppa-first-"+p).show(),_wppaCurIdx[p]!=_wppaSlides[p].length-1&&jQuery(".wppa-last-"+p).show(),wppaShareHideWhenRunning&&jQuery("#wppa-share-"+p).css("display",""),wppaFotomotoToolbar(p,_wppaHiresUrl[p][_wppaCurIdx[p]])):(jQuery("#wppa-comtable-wrap-"+p).css("display","none"),jQuery("#wppa-comform-wrap-"+p).css("display","none"),jQuery("#wppa-comfooter-wrap-"+p).css("display","block"),wppaFotomotoHide(p)),"show"==a?(jQuery("#imagedesc-"+p).css("visibility","visible"),jQuery("#imagetitle-"+p).css("visibility","visible"),jQuery("#counter-"+p).css("visibility","visible"),jQuery("#iptccontent-"+p).css("visibility","visible"),jQuery("#exifcontent-"+p).css("visibility","visible")):(jQuery("#counter-"+p).css("visibility","hidden"),jQuery(".wppa-first-"+p).hide(),jQuery(".wppa-last-"+p).hide(),jQuery("#iptccontent-"+p).css("visibility","hidden"),jQuery("#exifcontent-"+p).css("visibility","hidden")))}function wppaGetSlideshowTimeout(p,a){var e,t;return"random"==_wppaTimeOut[p]?(e=2*wppaAnimationSpeed,t=7*wppaAnimationSpeed,Math.floor(Math.random()*(t-e+1))+e):_wppaTimeOut[p]}function wppaIsSlidshowVisible(p){if(!wppaLazyLoad)return!0;for(var a,e=["slide_frame-"+p,"filmwindow-"+p],t=e.length,i=0;i<t;i++)if(a=document.getElementById(e[i]),a&&(a.getBoundingClientRect(),wppaIsElementInViewport(a)))return!0;return wppaFilmInit[p]=!1}function wppaFilmThumbToCanvas(p){var a,e,t=p+"-canvas",i=document.getElementById(p),w=document.getElementById(t);void 0!==w&&(a=w.getContext("2d"),e=i.naturalWidth|i.videoWidth,p=i.naturalHeight|i.videoHeight,(t=w.width)/(w=w.height)<e/p?(fromWidth=p*t/w,fromX=(e-fromWidth)/2,a.drawImage(i,fromX,0,fromWidth,p,0,0,t,w)):(fromHeight=e*w/t,fromY=(p-fromHeight)/2,a.drawImage(i,0,fromY,e,fromHeight,0,0,t,w)))}
// wppa-ajax-front
var wppaJsAjaxVersion="9.0.07.001";function wppaDoAjaxRender(e,o,a,r,t){e.stopPropagation(),""!=wppaLang&&(a+="&lang="+wppaLang),wppaAutoColumnWidth[o]&&(a+="&resp=1"),a+="&wppa-cw="+wppaGetContainerWidth(o),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(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce),_wppaSSRuns[o]&&_wppaStop(o),jQuery("#wppa-ajax-spin-"+o).fadeIn()},success:function(e,a,t){var p;"string"==typeof e&&"{"!=e.substr(0,1)?"<!DOCTYPE"==e.substr(0,9)||"<html"==e.substr(0,5)?0<r.length?document.location.href=r:alert(__("Frontend Ajax request failed. Try a different setting in Advanced settings -> System -> I -> Item 5","wp-photo-album-plus")):alert(__("Unexpected output","wp-photo-album-plus")+": "+e.substr(0,100)+"..."):(p="string"==typeof e?(p=JSON.parse(e)).html+"<script>"+p.js+"<\/script>":e.html+"<script>"+e.js+"<\/script>",wppaRenderModal&&r?(e={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:"",classes:"wppa-dialog"},wppaPrepareModal(o),jQuery("#wppa-modal-container-"+o).html(p),jQuery("#wppa-modal-container-"+o).dialog(e),e=-1!=p.indexOf("slide-frame")?1==wppaAreaMaxFracSlide?wppaWindowHeight()/20:(wppaWindowHeight()-wppaWindowHeight()*wppaAreaMaxFracSlide)/2:1==wppaAreaMaxFrac?wppaWindowHeight()/20:(wppaWindowHeight()-wppaWindowHeight()*wppaAreaMaxFrac)/2,jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5,margin:"auto",overflow:"hidden",position:"fixed",left:(wppaWindowWidth()-wppaGetContainerWidth(o))/2+"px",top:e+"px"}),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-ajax-spin").stop().fadeOut(),setTimeout(function(){jQuery().niceScroll&&(jQuery(".wppa-albumlist-"+o).niceScroll(".wppa-nicewrap",{}),jQuery(".wppa-slidelist-"+o).niceScroll(".wppa-nicewrap",{}))},1e3),jQuery(document).trigger("resize")):(jQuery("#wppa-container-"+o).html(p),jQuery("#wppa-button-hide-"+o).show()),wppaCanPushState&&wppaUpdateAddressLine&&r&&(r=r.split("&").join("&"),history.pushState({type:"ajax"},"",r)),wppaUpdateLightboxes(),"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(r),wppaColWidth[o]=0,_wppaDoAutocol(o,"ajax"))},error:function(e,a,t){wppaConsoleLog("wppaDoAjaxRender failed. Error = "+t+", status = "+a),r?document.location.href=r:document.location.reload(!0)},complete:function(e,a,t){!wppaRenderModal&&wppaAjaxScroll&&jQuery("html, body").animate({scrollTop:jQuery("#wppa-container-"+o).offset().top-32-wppaStickyHeaderHeight},1e3),jQuery(".wppa-ajax-spin").stop().fadeOut(),window.dispatchEvent(new Event("resize")),wppaProtect(),wppaDoInit()}}):(document.location.href=r,wppaColWidth[o]=0,_wppaDoAutocol(o,"nonajax"))}function wppaDoFetchShortcodeRendered(o,e,a){jQuery.ajax({url:wppaAjaxUrl+"?action=wppa&wppa-action=getshortcodedrenderedfenodelay&wppa-shortcode="+e+"&wppa-nonce="+jQuery("#wppa-nonce").val()+"&wppa-occur="+o+"&wppa-fromp="+a,async:!0,type:"GET",timeout:6e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce),jQuery("#wppa-ajax-spin-"+o).show()},success:function(e,a,t){var p;try{p="rest"==wppaAjaxMethod?e.html+"<script>"+e.js+"<\/script>":(p=JSON.parse(e)).html+"<script>"+p.js+"<\/script>",jQuery("#wppa-container-"+o).html(p)}catch(e){wppaConsoleLog("wppaDoFetchShortcodeRendered failed. Invalid json data")}},error:function(e,a,t){wppaConsoleLog("wppaDoFetchShortcodeRendered failed. Error = "+t+", status = "+a)},complete:function(e,a){jQuery(document).trigger("resize"),wppaProtect(),jQuery("#wppa-ajax-spin-"+o).hide(),wppaInitOverlay()}})}function wppaAjaxApprovePhoto(p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&photo-id="+p,async:!0,type:"GET",timeout:6e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce)},success:function(e,a,t){e="rest"==wppaAjaxMethod?e.txt:(theResult=JSON.parse(e),theResult.txt);"OK"==e&&jQuery(".wppa-approve-"+p).css("display","none")},error:function(e,a,t){wppaConsoleLog("wppaAjaxApprovePhoto failed. Error = "+t+", status = "+a)}})}function wppaAjaxRemovePhoto(p,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&photo-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce)},success:function(e,a,t){e="rest"==wppaAjaxMethod?e.txt:(theResult=JSON.parse(e),theResult.txt);rtxt=e.split("||"),"OK"==rtxt[0]?r?(jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).attr("src",""),jQuery("#wppa-pre-"+_wppaCurIdx[p]+"-"+p).attr("src",""),jQuery("#wppa-film-"+_wppaCurIdx[p]+"-"+p).attr("alt","removed"),jQuery("#wppa-pre-"+_wppaCurIdx[p]+"-"+p).attr("alt","removed"),wppaNext(p)):(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(e)},error:function(e,a,t){wppaConsoleLog("wppaAjaxRemovePhoto failed. Error = "+t+", status = "+a)}})}function wppaAjaxApproveComment(p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=approve&comment-id="+p,async:!0,type:"GET",timeout:6e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce)},success:function(e,a,t){e="rest"==wppaAjaxMethod?e.txt:(theResult=JSON.parse(e),theResult.txt);"OK"==e?jQuery(".wppa-approve-"+p).css("display","none"):alert(e)},error:function(e,a,t){wppaConsoleLog("wppaAjaxApproveComment failed. Error = "+t+", status = "+a)}})}function wppaAjaxRemoveComment(p){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=remove&comment-id="+p,async:!0,type:"GET",timeout:6e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce)},success:function(e,a,t){e="rest"==wppaAjaxMethod?e.txt:(theResult=JSON.parse(e),theResult.txt);"OK"==e.split("||")[0]?(jQuery(".wppa-approve-"+p).css("display","none"),jQuery(".wppa-comment-"+p).css("display","none")):alert(e)},error:function(e,a,t){wppaConsoleLog("wppaAjaxRemoveComment failed. Error = "+t+", status = "+a)}})}function wppaAjaxAddPhotoToZip(p,o,r){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=addtozip&photo-id="+o,async:!0,type:"GET",timeout:6e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce)},success:function(e,a,t){e="rest"==wppaAjaxMethod?e.txt:(theResult=JSON.parse(e),theResult.txt),e=e.split("||");"OK"==e[0]&&(jQuery("#admin-choice-"+o+"-"+p).html(e[2]),jQuery("#admin-choice-"+o+"-"+p).val(e[2]),jQuery("#admin-choice-"+o+"-"+p).prop("disabled",!0)),alert(e[1]),r&&document.location.reload(!0)},error:function(e,a,t){wppaConsoleLog("wppaAjaxAddPhotoToZip failed. Error = "+t+", status = "+a)}})}function wppaAjaxRemovePhotoFromZip(o,r,n){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=removefromzip&photo-id="+r,async:!0,type:"GET",timeout:6e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce)},success:function(e,a,t){var p="rest"==wppaAjaxMethod?e.txt:(theResult=JSON.parse(e),theResult.txt),e=p.split("||");"OK"==e[0]?(jQuery("#admin-choice-rem-"+r+"-"+o).val(e[1]),jQuery("#admin-choice-rem-"+r+"-"+o).prop("disabled",!0),jQuery("#admin-choice-rem-"+r+"-"+o).css("text-decoration","")):alert(p),n&&document.location.reload(!0)},error:function(e,a,t){wppaConsoleLog("wppaAjaxRemovePhotoFromZip failed. Error = "+t+", status = "+a,"force")}})}function wppaAjaxDeleteMyZip(){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=delmyzip",async:!0,type:"GET",timeout:6e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce)},success:function(e,a,t){"rest"==wppaAjaxMethod?e.txt:(theResult=JSON.parse(e),theResult.txt);document.location.reload(!0)},error:function(e,a,t){wppaConsoleLog("wppaAjaxDeleteMyZip failed. Error = "+t+", status = "+a)}})}function wppaAjaxRequestInfo(e,a,t){dialogHtml='<div class="wppa-modal"><h3>'+__("Please specify your question","wp-photo-album-plus")+'</h3><textarea id="wppa-request-info-text-'+e+'" style="width:98%;" ></textarea><div style="clear:both;" ></div><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="'+__("Send","wp-photo-album-plus")+'" onclick="wppaAjaxRequestInfoSend( '+e+", '"+a+"', "+t+' )" /><input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="'+__("Cancel","wp-photo-album-plus")+'" onclick="jQuery( \'#wppa-modal-container-'+e+"' ).dialog( 'close' );\" /><div style=\"clear:both;\" ></div></div>";t={modal:!0,resizable:!0,width:wppaGetContainerWidth(e),show:{effect:"fadeIn",duration:400},closeText:"",classes:"wppa-dialog"};wppaPrepareModal(e),jQuery("#wppa-modal-container-"+e).html(dialogHtml),jQuery("#wppa-modal-container-"+e).dialog(t),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5,position:"fixed",top:wppaWindowHeight()/10+"px"}),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"),jQuery(document).trigger("resize")}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,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce)},success:function(e,a,t){var p="rest"==wppaAjaxMethod?e.txt:(theResult=JSON.parse(e),theResult.txt),e=p.split("||");"OK"==e[0]?(jQuery("#request-info-"+r+"-"+o).val(e[1]),jQuery("#request-info-"+r+"-"+o).prop("disabled",!0)):alert(p),n?document.location.reload(!0):(jQuery("#wppa-modal-container-"+o).dialog("close"),jQuery("#wppa-modal-container-"+o).html(""))},error:function(e,a,t){wppaConsoleLog("wppaAjaxRequestInfoSend failed. Error = "+t+", status = "+a)}})}function wppaEditPhoto(o,e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=front-edit&photo-id="+e+"&occur="+o,async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce)},success:function(e,a,t){var p="rest"==wppaAjaxMethod?e.txt:(theResult=JSON.parse(e),theResult.txt),e={modal:!0,resizable:!0,width:wppaGetContainerWidth(o),show:{effect:"fadeIn",duration:400},closeText:"",classes:"wppa-dialog"};wppaPrepareModal(o),jQuery("#wppa-modal-container-"+o).html(p),jQuery("#wppa-modal-container-"+o).dialog(e),jQuery(".ui-dialog").css({boxShadow:"0px 0px 5px 5px #aaaaaa",borderRadius:wppaBoxRadius+"px",padding:"8px",backgroundColor:wppaModalBgColor,boxSizing:"content-box",zIndex:1e5,position:"fixed",top:wppaWindowHeight()/10+"px"}),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"),jQuery(document).trigger("resize"),jQuery(".ui-dialog").on("scroll wheel",function(e){e.stopPropagation()})},error:function(e,a,t){wppaConsoleLog("wppaEditPhoto failed. Error = "+t+", status = "+a)},complete:function(e,a,t){}})}function wppaPrevTags(e,a,t,p,o,r,n,i,s){var e=jQuery("#"+e).val()||"",a=jQuery("#"+a).val()||"",t=jQuery("#"+t).val()||"",p=jQuery("#"+p).val()||"",o=jQuery("#"+o).val()||"",u=jQuery("#"+i).val()||"";jQuery("#"+i).val(s),jQuery("#"+i).attr("disabled","disabled");o="action=wppa&wppa-action=sanitizetags&tags="+e+","+a+","+t+","+p+"&album="+o;jQuery.ajax({url:wppaAjaxUrl,data:o,async:!0,type:"GET",timeout:6e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce),jQuery("#"+r).html("Working...")},success:function(e,a,t){e="rest"==wppaAjaxMethod?e.txt:(theResult=JSON.parse(e),theResult.txt);jQuery("#"+n).attr("value",wppaTrim(e,",")),jQuery("#"+r).html(wppaTrim(e,",")),jQuery("#"+i).val(u),jQuery("#"+i).removeAttr("disabled")},error:function(e,a,t){jQuery("#"+r).html('<span style="color:red" >'+t+"</span>"),wppaConsoleLog("wppaPrevTags failed. Error = "+t+", status = "+a)}})}function wppaAjaxDestroyAlbum(e,a){return confirm("Are you sure you want to delete this album?")&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=destroyalbum&album="+e+"&nonce="+a,async:!0,type:"GET",timeout:6e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce)},success:function(e,a,t){e="rest"==wppaAjaxMethod?e.txt:(theResult=JSON.parse(e),theResult.txt);alert(e+"\n"+__("Page will be reloaded","wp-photo-album-plus")),document.location.reload(!0)},error:function(e,a,t){wppaConsoleLog("wppaAjaxDestroyAlbum failed. Error = "+t+", status = "+a)}}),!1}function _bumpClickCount(e){wppaBumpClickCount&&jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpclickcount&wppa-photo="+e+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!1,type:"GET",timeout:6e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce)},success:function(e,a,t){"rest"==wppaAjaxMethod?e.txt:(theResult=JSON.parse(e),theResult.txt)},error:function(e,a,t){wppaConsoleLog("_bumpClickCount failed. Error = "+t+", status = "+a)}})}function _bumpViewCount(p){wppaBumpViewCount&&(wppaPhotoView[p]||jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpviewcount&wppa-photo="+p+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce)},success:function(e,a,t){"rest"==wppaAjaxMethod?e.txt:(theResult=JSON.parse(e),theResult.txt);wppaPhotoView[p]=!0},error:function(e,a,t){wppaConsoleLog("_bumpViewCount failed. Error = "+t+", status = "+a)}}))}function wppaVoteThumb(p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating=1&wppa-rating-id="+o+"&wppa-occur="+p+"&wppa-index=0&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce)},success:function(e,a,t){"rest"==wppaAjaxMethod?e.txt:(theResult=JSON.parse(e),theResult.txt);jQuery("#wppa-vote-button-"+p+"-"+o).val(wppaVotedForMe)},error:function(e,a,t){wppaConsoleLog("wppaVoteThumb failed. Error = "+t+", status = "+a)}})}function _wppaRateIt(o,a){var e,t,p;0!=a&&(_wppaSSRuns[o]||(e=_wppaId[o][_wppaCurIdx[o]],t=_wppaMyr[o][_wppaCurIdx[o]],0<(p=_wppaWaitTexts[o][_wppaCurIdx[o]]).length?alert(p):0!=t&&wppaRatingOnce||t<0||(_wppaVoteInProgress=!0,jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=rate&wppa-rating="+a+"&wppa-rating-id="+e+"&wppa-occur="+o+"&wppa-index="+_wppaCurIdx[o]+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce),jQuery("#wppa-rate-"+o+"-"+a).attr("src",wppaImageDirectory+"tick.png"),jQuery("#wppa-rate-"+o+"-"+a).stop().fadeTo(100,1),jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,a,t){var p="rest"==wppaAjaxMethod?e.txt:(theResult=JSON.parse(e),theResult.txt),e=p.split("||");0==e[0]?900==e[1]?(alert(e[2]),_wppaSetRatingDisplay(o)):alert(__("Error Code","wp-photo-album-plus")+" = "+e[1]+"\n\n"+e[2]):(e[7]&&"likes"==e[7]?(p=e[4].split("|"),jQuery("#wppa-like-"+o).attr("title",p[0]),jQuery("#wppa-liketext-"+o).html(p[1]),"1"==e[3]?jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o).attr("src",wppaImageDirectory+"thumbup.png"),_wppaMyr[e[0]][e[2]]=e[3],_wppaAvg[e[0]][e[2]]=e[4]):(_wppaMyr[e[0]][e[2]]=e[3],_wppaAvg[e[0]][e[2]]=e[4],_wppaDisc[e[0]][e[2]]=e[5],_wppaSetRatingDisplay(o),wppaCommentRequiredAfterVote&&0==e[6]&&alert(e[7])),wppaNextOnCallback&&_wppaNextOnCallback(o))},error:function(e,a,t){wppaConsoleLog("_wppaRateIt failed. Error = "+t+", status = "+a)}}))))}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(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce),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(e,a,t){var p=e.txt||(theResult=JSON.parse(e),theResult.txt),e=p.split("||");if(0==e[0])900==e[1]?alert(e[2]):alert(__("Error Code","wp-photo-album-plus")+" = "+e[1]+"\n\n"+e[2]),jQuery(".wppa-rate-"+n+"-"+r).attr("src",wppaImageDirectory+"cross.png");else{if(e[7]&&"likes"==e[7]){p=e[4].split("|");return jQuery("#wppa-like-0").attr("title",p[0]),jQuery("#wppa-liketext-0").html(p[1]),"1"==e[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",p[0]),jQuery("#wppa-liketext-"+o+"-"+n).html(p[1]),void("1"==e[3]?jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbdown.png"):jQuery("#wppa-like-"+o+"-"+n).attr("src",wppaImageDirectory+"thumbup.png"))}_wppaSetRd(n,e[4],".wppa-avg-"),_wppaSetRd(n,e[3],".wppa-rate-"),i||wppaNextOnCallback&&wppaOvlShowNext()}},error:function(e,a,t){wppaConsoleLog("_wppaOvlRateIt failed. Error = "+t+", status = "+a)}})}function wppaAjaxDownloadAlbum(p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=downloadalbum&album-id="+o,async:!0,type:"GET",timeout:12e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce),jQuery("#dwnspin-"+p+"-"+o).css("display","")},success:function(e,a,t){var p=e.txt||(theResult=JSON.parse(e),theResult.txt),o=p.split("||"),r=o[0],e=o[1],p=o[2];3==o.length&&""!=p&&alert(__("Attention","wp-photo-album-plus")+":\n\n"+p),"OK"==e?document.location=r:alert(__("The server could not complete the request. Please try again.","wp-photo-album-plus"))},error:function(e,a,t){alert("An error occurred:\n"+t+"\nPlease try again")},complete:function(e,a,t){jQuery("#dwnspin-"+p+"-"+o).css("display","none")}})}function wppaAjaxComment(p,e){var a;_wppaValidateComment(p,e)&&(a=(a=jQuery("#wppa-comment-"+p).val()).replace(/&/g,"%26"),a={photoid:e,comname:jQuery("#wppa-comname-"+p).val(),comment:a,captcha:jQuery("#wppa-captcha-"+p).val(),nonce:jQuery("#wppa-nonce").val(),occur:p,comemail:jQuery("#wppa-comemail-"+p).val(),comid:jQuery("#wppa-comment-edit-"+p).val(),returnurl:encodeURIComponent(jQuery("#wppa-returnurl-"+p).val()),dbagree:jQuery("#db-agree-"+p).prop("checked")?"yes":"no"},a=JSON.stringify(a),jQuery.ajax({url:wppaAjaxUrl+"?action=wppa&wppa-action=do-comment",data:"data="+a,async:!0,type:"POST",timeout:6e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce),jQuery("#wppa-comment-spin-"+p).css("display","inline")},success:function(e,a,t){e=e.txt||(theResult=JSON.parse(e),theResult.txt);e&&(e=e.replace(/\\/g,""),jQuery("#wppa-comments-"+p).html(e),_wppaCurIdx[p]&&(_wppaCommentHtml[p][_wppaCurIdx[p]]=e)),wppaOpenComments(p)},error:function(e,a,t){wppaConsoleLog("wppaAjaxComment failed. Error = "+t+", status = "+a)},complete:function(e,a,t){jQuery("#wppa-comment-spin-"+p).css("display","none")}}))}function wppaUpdatePhotoNew(e,p){for(var a,t=["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"],o="action=wppa&wppa-action=update-photo-new&photo-id="+e+"&wppa-nonce="+jQuery("#wppa-nonce-"+e).val(),r=0;r<t.length;)void 0!==jQuery("#"+t[r]).val()&&(o+="&"+t[r]+"="+jQuery("#"+t[r]).val()),void 0!==(a=wppaGetTinyMceContent(t[r]))&&(o+="&"+t[r]+"="+a),r++;jQuery("#upn-reload").prop("checked")&&(o+="&upn-reload=on"),jQuery.ajax({url:wppaAjaxUrl,data:o,async:!0,type:"POST",timeout:1e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce)},success:function(e,a,t){e="object"==typeof e?e:JSON.parse(e);e.error?(wppaConsoleLog("Failed to report updates","force"),alert(e.error)):(void 0!==e.description&&jQuery(".sdd-"+p).html(e.description),void 0!==e.name&&jQuery(".sdn-"+p).html(e.name),void 0!==e.fullname&&jQuery(".sdf-"+p).html(e.fullname),_wppaNames[p]&&(void 0!==e.name&&(_wppaNames[p][_wppaCurIdx[p]]=wppaFixHtml(e.name)),void 0!==e.fullname&&(_wppaFullNames[p][_wppaCurIdx[p]]=wppaFixHtml(e.fullname)),void 0!==e.description&&(_wppaDsc[p][_wppaCurIdx[p]]=wppaFixHtml(e.description)),jQuery("#imagetitle-"+p).html(wppaMakeNameHtml(p))))},error:function(e,a,t){wppaConsoleLog("wppaUpdatePhotoNew failed. Error = "+t+", status = "+a)},complete:function(e,a,t){jQuery("#upn-reload").prop("checked")?document.location.reload(!0):(jQuery("#wppa-modal-container-"+p).dialog("close"),jQuery("#wppa-modal-container-"+p).html(""))}})}function wppaFixHtml(e){return e?e=(e=(e=(e=e.replace(/\[/g,"<")).replace(/\]/g,">")).replace(/"/g,'"')).replace(/\\n/g," "):""}var wppaLastQrcodeUrl="";function wppaAjaxSetQrCodeSrc(e,p){0!=jQuery(p).length&&wppaLastQrcodeUrl!=e&&(wppaLastQrcodeUrl=e,e="action=wppa&wppa-action=getqrcode&wppa-qr-nonce="+jQuery("#wppa-qr-nonce").val()+"&url="+encodeURIComponent(e),jQuery.ajax({url:wppaAjaxUrl,data:e,async:!0,type:"POST",timeout:1e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce)},success:function(e,a,t){e="rest"==wppaAjaxMethod?e.txt:(theResult=JSON.parse(e),theResult.txt),e=e.split("|");jQuery(p).attr("src",e[0]),jQuery(p).attr("title",e[1])},error:function(e,a,t){wppaConsoleLog("wppaAjaxSetQrCodeSrc failed. Error = "+t+", status = "+a)}}))}function wppaAjaxNotify(e,p,o){e=jQuery(e).prop("checked")?"on":"off",e="action=wppa&wppa-action=mailinglist&wppa-ntfy-nonce="+jQuery("#wppa-ntfy-nonce").val()+"&list="+p+"&onoff="+e;o&&(e+="&wppa-user="+o),jQuery.ajax({url:wppaAdminAjaxUrl,data:e,async:!0,type:"POST",timeout:1e4,beforeSend:function(e){o&&jQuery("#img_"+p+"-"+o).attr("src",wppaImageDirectory+"spinner.gif")},success:function(e,a,t){o&&jQuery("#img_"+p+"-"+o).attr("src",wppaImageDirectory+"tick.png")},error:function(e,a,t){wppaConsoleLog("wppaAjaxNotify failed. Error = "+t+", status = "+a),jQuery("#img_"+p+"-"+o).attr("src",wppaImageDirectory+"cross.png")}})}function wppaAjaxGetSsIptcList(e,a,t,p){wppaAjaxGetSsIptcExifList(e,a,t,p,"iptc")}function wppaAjaxGetSsExifList(e,a,t,p){wppaAjaxGetSsIptcExifList(e,a,t,p,"exif")}function wppaAjaxGetSsIptcExifList(p,o,r,n,i){ajaxurl=wppaAjaxUrl,ajaxurl+="?action=wppa&wppa-action=getss"+i+"list&"+i+"tag="+o+"&occur="+p,jQuery.ajax({url:ajaxurl,async:!0,type:"GET",timeout:1e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce),jQuery("#wppa-ss-spinner-"+p).css("display","")},success:function(e,a,t){e="rest"==wppaAjaxMethod?e.txt:(theResult=JSON.parse(e),theResult.txt);jQuery("#"+r).html(e),jQuery("#wppa-ss-"+i+"opts-"+p).css("display",""),wppaSuperSearchSelect(p),setTimeout('wppaSetIptcExifSize( ".wppa-'+i+"list-"+p+'", "#'+r+'" )',10),n&&wppaConsoleLog("wppaAjaxGetSs"+i+"List success after retry.")},error:function(e,a,t){wppaConsoleLog("wppaAjaxGetSs"+i+"List failed. Error = "+t+", status = "+a),n||wppaAjaxGetSsIptcExifList(p,o,r,!0,i)},complete:function(e,a,t){jQuery("#wppa-ss-spinner-"+p).css("display","none")}})}function wppaPrepareModal(a){try{jQuery("#wppa-modal-container-"+a).dialog("destroy"),jQuery("#wppa-modal-container-"+a).html("")}catch(e){jQuery("#wppa-modal-container-"+a).html("")}}function wppaAjaxBumpDownloadCount(e){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=bumpdownloadcount&wppa-photo="+e+"&wppa-nonce="+jQuery("#wppa-nonce").val(),async:!0,type:"GET",timeout:6e4,beforeSend:function(e){"rest"==wppaAjaxMethod&&e.setRequestHeader("X-WP-NONCE",wppaObj.restNonce)},success:function(e,a,t){},error:function(e,a,t){wppaConsoleLog("wppaAjaxBumpDownloadCount. Error = "+t+", status = "+a)}})}
// wppa-lightbox
var wppaJsLightboxVersion="9.0.08.003",wppaOvlActivePanorama=0;function wppaOvlKeyboardHandler(p){var a,e=(a=(null==p?event:p).keyCode,27),p=String.fromCharCode(a).toLowerCase();switch(a){case e:wppaStopVideo(0),wppaStopAudio(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),wppaStopAudio(0),wppaOvlHide()}return!1}function wppaOvlShow(p){var a,e;for(i=0;i<wppaSlidePause.length;i++)wppaSlidePause[i]=!0,wppaStopVideo(i),wppaStopAudio(i);if(jQuery("#wppa-overlay-bg").css({display:"inline"}),wppaOvlFirst&&(jQuery("#weaver-final").removeClass("wvr-hide-bang"),wppaKbHandlerInstalled||(jQuery(document).on("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!0),jQuery(window).trigger("wppalightboxstart")),"object"==typeof p){wppaOvlIds=[],wppaOvlUrls=[],wppaOvlTitles=[],wppaOvlAlts=[],wppaOvlTypes=[],wppaOvlVideoHtmls=[],wppaOvlAudioHtmls=[],wppaOvlPdfHtmls=[],wppaOvlVideoNaturalWidths=[],wppaOvlVideoNaturalHeights=[],wppaOvlImgs=[],wppaOvlIdx=0,wppaOvlPanoramaHtml=[],wppaOvlPanoramaIds=[],wppaOvlHasPanoramas=!1;var l=(p.rel||!!jQuery(p).attr("data-rel")&&jQuery(p).attr("data-rel")).split("[");if(l[1]){var o,i,r=l[1],w=jQuery("a"),n=0;for(i=0;i<w.length;i++)o=w[i],1<(l=!!jQuery(o).attr("data-rel")&&jQuery(o).attr("data-rel").split("[")).length&&"wppa"==l[0]&&l[1]==r&&(wppaOvlUrls[n]=o.href,jQuery(o).attr("data-lbtitle")?wppaOvlTitles[n]=wppaRepairScriptTags(jQuery(o).attr("data-lbtitle")):wppaOvlTitles[n]=wppaRepairScriptTags(o.title),wppaOvlIds[n]=jQuery(o).attr("data-id")?jQuery(o).attr("data-id"):"0",wppaOvlAlts[n]=jQuery(o).attr("data-alt")?jQuery(o).attr("data-alt"):"",wppaOvlVideoHtmls[n]=jQuery(o).attr("data-videohtml")?decodeURI(jQuery(o).attr("data-videohtml")):"",wppaOvlPdfHtmls[n]=jQuery(o).attr("data-pdfhtml")?decodeURI(jQuery(o).attr("data-pdfhtml")):"",wppaOvlAudioHtmls[n]=jQuery(o).attr("data-audiohtml")?decodeURI(jQuery(o).attr("data-audiohtml")):"",wppaOvlVideoNaturalWidths[n]=jQuery(o).attr("data-videonatwidth")?jQuery(o).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[n]=jQuery(o).attr("data-videonatheight")?jQuery(o).attr("data-videonatheight"):"",a=jQuery(o).attr("data-panorama")?jQuery(o).attr("data-panorama"):"",panType=jQuery(o).attr("data-pantype")?jQuery(o).attr("data-pantype"):"",0<a.length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[n]=a.substr(e+1),wppaOvlPanoramaIds[n]=a.substr(0,e),wppaOvlTypes[n]=panType):(wppaOvlPanoramaHtml[n]="",wppaOvlPanoramaIds[n]=0,wppaOvlTypes[n]=""),0<wppaOvlPdfHtmls[n].length&&(wppaOvlTypes[n]="document"),decodeURI(jQuery(o).attr("data-pdfhtml"))==decodeURI(jQuery(p).attr("data-pdfhtml"))&&decodeURI(jQuery(o).attr("data-videohtml"))==decodeURI(jQuery(p).attr("data-videohtml"))&&decodeURI(jQuery(o).attr("data-audiohtml"))==decodeURI(jQuery(p).attr("data-audiohtml"))&&o.href==p.href&&(wppaOvlIdx=n),n++);l=r.replace(/]+$/,""),wppaFromMocc="occ"==r.substr(0,3)?l.substr(3):"alw"==l.substr(0,3)?(t=l.split("-"),t[1]):r,wppaOvlSlideSpeed=wppaOvlTimeout[wppaFromMocc]||wppaOvlSlideSpeedDefault}else wppaOvlUrls[0]=p.href,jQuery(p).attr("data-lbtitle")?wppaOvlTitles[0]=wppaRepairScriptTags(jQuery(p).attr("data-lbtitle")):wppaOvlTitles[0]=wppaRepairScriptTags(p.title),wppaOvlIds[0]=jQuery(p).attr("data-id")?jQuery(p).attr("data-id"):"0",wppaOvlAlts[0]=jQuery(p).attr("data-alt")?jQuery(p).attr("data-alt"):"",wppaOvlVideoHtmls[0]=jQuery(p).attr("data-videohtml")?decodeURI(jQuery(p).attr("data-videohtml")):"",wppaOvlAudioHtmls[0]=jQuery(p).attr("data-audiohtml")?decodeURI(jQuery(p).attr("data-audiohtml")):"",wppaOvlPdfHtmls[0]=jQuery(p).attr("data-pdfhtml")?decodeURI(jQuery(p).attr("data-pdfhtml")):"",wppaOvlVideoNaturalWidths[0]=jQuery(p).attr("data-videonatwidth")?jQuery(p).attr("data-videonatwidth"):"",wppaOvlVideoNaturalHeights[0]=jQuery(p).attr("data-videonatheight")?jQuery(p).attr("data-videonatheight"):"",a=jQuery(p).attr("data-panorama")?jQuery(p).attr("data-panorama"):"",panType=jQuery(p).attr("data-pantype")?jQuery(p).attr("data-pantype"):"",0<a.length?(wppaOvlHasPanoramas=!0,e=a.indexOf("."),wppaOvlPanoramaHtml[0]=a.substr(e+1),wppaOvlPanoramaIds[0]=a.substr(0,e),wppaOvlTypes[0]=panType):(wppaOvlPanoramaHtml[0]="",wppaOvlPanoramaIds[0]=0,wppaOvlTypes[0]=""),0<wppaOvlPdfHtmls[0].length&&(wppaOvlTypes[0]="document"),wppaOvlIdx=0}else wppaOvlIdx=p;wppaOvlOpen=!0,jQuery("body").trigger("quitimage"),setTimeout(function(){_wppaOvlShow(wppaOvlIdx)},100)}function _wppaOvlShow(p){jQuery("#wppa-overlay-ic").html("").hide(),jQuery("#wppa-overlay-pc").html("").hide(),jQuery("#wppa-overlay-fpc").html("").hide(),jQuery("#wppa-overlay-zpc").html("").hide(),wppaOvlCurIdx=p,jQuery("#wppa-ovl-spin").show(),wppaIsVideo=""!=wppaOvlVideoHtmls[p],wppaHasAudio=""!=wppaOvlAudioHtmls[p],wppaOvlIsPdf=""!=wppaOvlPdfHtmls[p];var a=wppaOvlIdx==wppaOvlUrls.length-1?0:wppaOvlIdx+1,e=0==wppaOvlIdx?wppaOvlUrls.length-1:wppaOvlIdx-1;if(""==wppaOvlTypes[a]&&""==wppaOvlVideoHtmls[a]&&wppaOvlOpen&&(document.getElementById("wppa-pre-next").src=wppaOvlUrls[a]),""==wppaOvlTypes[e]&&""==wppaOvlVideoHtmls[e]&&wppaOvlOpen&&(document.getElementById("wppa-pre-prev").src=wppaOvlUrls[e]),_bumpViewCount(wppaOvlIds[p]),wppaOvlIsSingle=1==wppaOvlUrls.length,wppaOvlActivePanorama=wppaOvlPanoramaIds[p],wppaIsFs()||wppaOvlActivePanorama){if(wppaOvlActivePanorama?t=wppaOvlPanoramaHtml[p]:wppaIsVideo?t='<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 controlsList="nodownload nofullscreen noremoteplayback" preload="metadata"'+(wppaOvlVideoStart?" autoplay":"")+' ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" onpause="wppaOvlVideoOnPause(this);" onplay="wppaOvlVideoPlaying = true;" style="border:none; width:'+screen.width+'px; box-shadow:none; position:absolute;" alt="'+wppaOvlAlts[p]+'" >'+wppaOvlVideoHtmls[p]+"</video></div>":wppaOvlIsPdf?t='<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>':(t='<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&&(t+='<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>"),t+="</div>"),!wppaIsVideo&&!wppaHasAudio||wppaOvlFsPhotoId!=wppaPhotoId||0==wppaPhotoId)if(wppaStopVideo(0),wppaStopAudio(),0<wppaOvlActivePanorama)switch(wppaOvlTypes[p]){case"spheric":jQuery("#wppa-overlay-pc").html(t).show();break;case"flat":jQuery("#wppa-overlay-fpc").html(t).show();break;case"zoom":jQuery("#wppa-overlay-zpc").html(t).show()}else jQuery("#wppa-overlay-ic").html(t).show();0<wppaOvlPanoramaIds[p]&&wppaOvlIsSingle&&jQuery(".wppa-pan-prevnext").hide(),wppaProtect(),wppaOvlIsVideo=wppaIsVideo,setTimeout(wppaOvlFormatFull,10),wppaIsVideo||wppaHasAudio?setTimeout(function(){wppaOvlFsPhotoId=wppaPhotoId},20):wppaOvlFsPhotoId=0,""==wppaOvlTypes[p]&&jQuery("#wppa-overlay-ic").show()}else{wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaStopVideo(0);a="black"==wppaOvlTheme?"#a7a7a7":"#272727";wppaOvlFontColor&&(a=wppaOvlFontColor);wppaOvlUrls.length;0==wppaOvlActivePanorama&&jQuery("#wppa-overlay-ic").css({width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop});var t="";t+='<div id="img-sb-img-cont" style="position:relative;line-height:0;" >',wppaIsVideo?(t+='<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="wppaOvlVideoOnPause(this)" onplay="wppaOvlVideoPlaying = true;" ontouchstart="wppaTouchStart( event, \'wppa-overlay-img\', -1 );" ontouchend="wppaTouchEnd( event );" ontouchmove="wppaTouchMove( event );" ontouchcancel="wppaTouchCancel( event );" onclick="wppaOvlImgClick( event );" controls controlsList="nodownload nofullscreen noremoteplayback" 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?t+="<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>':(t+='<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&&(t+='<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),t+="</div>";e=!wppaOvlIsSingle&&wppaOvlShowCounter;t+='<div id="wppa-overlay-txt-container" style="position:relative;padding:10px;background-color:'+wppaOvlTheme+";color:"+a+";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;")+'box-shadow:none;" >',t+=wppaOvlNavBar(),t+=(e?wppaOvlIdx+1+"/"+wppaOvlUrls.length+"<br />":"")+wppaOvlTitles[p],t+="</div>",t+="</div>",(0==wppaOvlActivePanorama?jQuery("#wppa-overlay-ic"):jQuery("#wppa-overlay-pc")).html(t),""!=wppaOvlTypes[p]&&"document"!=wppaOvlTypes[p]||jQuery("#wppa-overlay-ic").show(),wppaFsShow(),wppaHideRightClick&&(jQuery("#wppa-overlay-img").bind("contextmenu",function(p){return!1}),jQuery("canvas").bind("contextmenu",function(p){return!1})),0==wppaOvlPanoramaIds[p]&&wppaOvlResize(),wppaFsShow(),wppaAdjustControlbar()}wppaFsShow(),wppaProtect();p=wppaOvlSlideStartDefault;"yes"==wppaOvlSlideStart[wppaFromMocc]&&(p=!0),"no"==wppaOvlSlideStart[wppaFromMocc]&&(p=!1),wppaOvlFirst&&p&&!wppaOvlIsSingle&&(wppaOvlRunning=!0,jQuery("#wppa-ovl-stop-btn").show(),jQuery("#wppa-ovl-start-btn").hide(),clearTimeout(wppaOvlTimer),wppaOvlTimer=setTimeout(wppaOvlRun,wppaOvlSlideSpeed)),wppaOvlFirst=!1}function wppaOvlVideoOnPause(p){p.ended?wppaOvlVideoPlaying=!1:wppaOvlVideoPauseStop&&4==p.readyState&&0<p.played.length&&0<p.played.end(0)&&(wppaOvlStop(),wppaOvlVideoPlaying=!1)}function wppaOvlSize(p){if(!wppaOvlActivePanorama){var a=document.getElementById("wppa-overlay-img"),e=document.getElementById("wppa-overlay-txt");if(a&&e&&"none"!=jQuery("#wppa-overlay-bg").css("display")){if(!wppaIsFs()){var t,l=wppaWindowWidth(),o=wppaWindowHeight(),i=wppaOvlIsVideo?(a.clientWidth,t=wppaOvlVideoNaturalWidths[wppaOvlCurIdx],wppaOvlVideoNaturalHeights[wppaOvlCurIdx]):wppaOvlIsPdf?(wppaWindowWidth(),t=.9*wppaWindowWidth(),.9*wppaWindowHeight()):(a.clientWidth,t=a.naturalWidth,a.naturalHeight);void 0===t&&(t=a.clientWidth,i=a.clientHeight),(a=(e=(l-3*wppaOvlBorderWidth)/t)<(a=o/i)?e:a)<1&&(t=parseInt(t*a),i=parseInt(i*a));var a=jQuery("#wppa-overlay-txt").height(),a="auto"==wppaOvlTxtHeight?(0==a&&(a=20+2*wppaOvlBorderWidth),o-a-20-2*wppaOvlBorderWidth):o-wppaOvlTxtHeight-20-2*wppaOvlBorderWidth,o=parseInt(a*t/i),o=(wppaOvlPadTop,parseInt((l-o)/2),o);i<a&&(wppaOvlPadTop,parseInt((l-t)/2),o=t);l=wppaSavedImageWidth-o<3&&o-wppaSavedImageWidth<3;return o<=10&&(i=180,l=!(t=o=240)),o=parseInt(o),wppaSavedImageWidth=parseInt(o),wppaSavedImageHeight=parseInt(o*i/t),wppaSavedMarginLeft=-parseInt(o/2+wppaOvlBorderWidth),wppaSavedContainerWidth=parseInt(o+2*wppaOvlBorderWidth),wppaSavedContainerHeight=parseInt(wppaSavedImageHeight+wppaOvlBorderWidth+jQuery("#wppa-overlay-txt-container").height()+20),wppaSavedMarginTop=-parseInt(wppaSavedContainerHeight/2),wppaAnimate("#wppa-overlay-img",{width:wppaSavedImageWidth,height:wppaSavedImageHeight},p,wppaEasingLightbox),wppaAnimate("#wppa-overlay-ic",{width:wppaSavedContainerWidth,marginLeft:wppaSavedMarginLeft,marginTop:wppaSavedMarginTop},p,wppaEasingLightbox),l?(jQuery("#wppa-ovl-spin").hide(),wppaOvlFirst=!1):setTimeout(function(){wppaOvlSize(wppaOvlAnimSpeed)},p+10),!0}wppaOvlFormatFull()}}}function wppaOvlFormatFull(){if(wppaOvlOpen&&!(0<wppaOvlActivePanorama)){var p,a=screen.height;if(wppaOvlIsVideo&&(a-=wppaOvlNavIconSize),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=a;else{if(p=document.getElementById("wppa-overlay-img"),!(wppaIsIe||p&&p.complete))return void setTimeout(wppaOvlFormatFull,200);o=p.naturalWidth,i=p.naturalHeight}var e=o/i,t=0,l=0,o=0,i=0,i=e<screen.width/a?(t=(screen.width-a*e)/2,l=0,(o=a)*e):(t=0,l=(a-screen.width/e)/2,o=screen.width/e,screen.width),t=parseInt(t),l=parseInt(l),o=parseInt(o);return i=parseInt(i),jQuery(p).css({height:o,width:i,marginLeft:t,marginTop:l,left:0,top:0,maxWidth:1e4}),jQuery(p).css({visibility:"visible"}),jQuery("#wppa-ovl-full-bg").css({overflow:"hidden"}),jQuery("#wppa-ovl-full-bg").scrollTop(0),jQuery("#wppa-ovl-full-bg").scrollLeft(0),jQuery("#wppa-ovl-spin").hide(),jQuery("#wppa-ovl-full-bg").css({visibility:"hidden"}),html=jQuery("#wppa-overlay-ic").html(),html+='<div style="position:fixed;bottom:0;left:0;right:0;" >'+wppaOvlNavBar()+"</div>",jQuery("#wppa-overlay-ic").html(html),wppaFsShow(),!0}}function wppaOvlStartAudio(){var p=document.getElementById("wppa-overlay-audio");p&&"function"==typeof p.play&&p.play()}function wppaOvlStartStop(){wppaOvlRunning?(wppaOvlRunning=!1,-1!=wppaOvlIdx&&(0!=wppaOvlIdx&&jQuery(".wppa-ovl-prev-btn").css("visibility","visible"),wppaOvlIdx!=wppaOvlUrls.length-1&&jQuery(".wppa-ovl-next-btn").css("visibility","visible")),wppaOvlShowStartStop&&(jQuery("#wppa-ovl-stop-btn").hide(),jQuery("#wppa-ovl-start-btn").show())):(wppaOvlRunning=!0,wppaOvlRun(),wppaOvlShowStartStop&&(jQuery("#wppa-ovl-stop-btn").show(),jQuery("#wppa-ovl-start-btn").hide()))}function wppaOvlStop(){wppaOvlRunning&&wppaOvlStartStop()}function wppaOvlRun(){if(wppaOvlRunning)if(wppaOvlVideoPlaying||wppaOvlAudioPlaying)setTimeout(wppaOvlRun,50);else{if(!wppaIsVideo&&!wppaOvlIsPdf){var p=document.getElementById("wppa-overlay-img");if(p&&!wppaIsIe&&!p.complete)return void setTimeout(wppaOvlRun,200)}wppaOvlShowNext(),clearTimeout(wppaOvlTimer),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(p){var a;wppaOvlOpen&&(a=wppaOvlCurIdx,wppaOvlRunning,wppaOvlHide(!0),jQuery("#wppa-ovl-spin").show(),setTimeout(function(){wppaOvlShow(a)},1e3))}function wppaOvlHide(p){var a;for(wppaOvlOpen=!1,wppaOvlClosing=!wppaOvlClosing,wppaStopAudio(),p||"lightbox"!=wppaFsPolicy||wppaIsFs()&&wppaFsOff(),jQuery("#wppa-overlay-ic").html("").hide(),jQuery("#wppa-overlay-pc").html("").hide(),jQuery("#wppa-overlay-fpc").html("").hide(),jQuery("#wppa-overlay-zpc").html("").hide(),jQuery(document).off("keydown",wppaOvlKeyboardHandler),wppaKbHandlerInstalled=!1,wppaOvlFirst=!0,wppaOvlRunning=!1,clearTimeout(wppaOvlTimer),jQuery("#wppa-ovl-spin").hide(),wppaOvlActivePanorama=0,jQuery("body").trigger("quitimage"),a=0;a<wppaSlidePause.length;a++)wppaSlidePause[a]=!1;document.onLbquitMocc&&(wppaStartStop(document.onLbquitMocc),document.onLbquitMocc=null,document.onLbquitIdx=null),jQuery(window).trigger("wppalightboxend"),jQuery(window).trigger("resize"),wppaOvlClosing&&wppaIsMobile?setTimeout(function(){wppaOvlHide(p)},250):(wppaOvlClosing=!1,p||setTimeout(function(){jQuery("#wppa-overlay-bg").hide(),jQuery("#wppa-ovl-spin").hide(),"global"==wppaFsPolicy&&wppaOvlBigBrowse&&wppaFsShow()},500),wppaAlbLbBusy=!1)}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(){jQuery(".wp-caption").each(function(){var p=jQuery(this),a=p.find("IMG[alt]").attr("alt")||"",e=p.find(".wp-caption-text").html()||"",p=p.find("a"),e=a+"<br>"+e;p.attr("data-lbtitle")||p.attr("data-lbtitle",e)});var p,a,e=jQuery("a"),t=[];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<e.length;a++)if(p=e[a],jQuery(p).attr("data-rel")?t=jQuery(p).attr("data-rel").split("["):p.rel?t=p.rel.split("["):t[0]="","wppa"==t[0])switch(wppaWppaOverlayActivated=!0,jQuery(p).on("click",function(p){wppaOvlShow(this),p.preventDefault()}),wppaMagnifierCursor){case"pointer":jQuery(p).css("cursor","pointer");break;case"":jQuery(p).css("cursor","default");break;default:jQuery(p).css("cursor","url( "+wppaImageDirectory+wppaMagnifierCursor+" ),auto")}jQuery(window).on("DOMContentLoaded load resize scroll orientationchange",wppaAdjustControlbar)}function wppaOvlResize(){0<wppaOvlActivePanorama||(setTimeout("wppaOvlSize( 10 )",10),wppaOvlAudioStart&&!wppaOvlAudioPlaying&&setTimeout(wppaOvlStartAudio,100))}function wppaOvlImgClick(p){wppaOvlBrowseOnClick&&!wppaOvlIsSingle&&(p.screenX<screen.width/2?wppaOvlShowPrev:wppaOvlShowNext)()}function wppaOvlNavBar(){var p="";return wppaOvlIsSingle||(wppaOvlBigBrowse&&(p+='<span id="wppa-ovl-prev-btn" class="wppa-ovl-prev-btn" style="position:fixed;top:50%;left:0;width:60px;height:60px;margin-top:-30px;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button-Big","60px",!0,!1,0,0,0,0)+"</span>"),wppaOvlSmallBrowse&&(p+='<span id="wppa-ovl-prev-btn" class="wppa-ovl-prev-btn" style="margin:0 2px 0 0;float:left;display:block;" onclick="wppaOvlShowPrev()" >'+wppaSvgHtml("Prev-Button",wppaOvlIconSize,!0,!0)+"</span>"),wppaOvlShowStartStop&&(p+='<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>"),wppaOvlBigBrowse&&(p+='<span id="wppa-ovl-next-btn" class="wppa-ovl-next-btn" style="position:fixed;top:50%;right:0;width:60px;height:60px;margin-top:-30px;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button-Big","60px",!0,!1,0,0,0,0)+"</span>"),wppaOvlSmallBrowse&&(p+='<span id="wppa-ovl-next-btn" class="wppa-ovl-next-btn" style="margin:0 2px;float:right;display:block;" onclick="wppaOvlShowNext()" >'+wppaSvgHtml("Next-Button",wppaOvlIconSize,!0,!0)+"</span>")),wppaOvlBigBrowse&&(p+='<span id="wppa-exit-btn-2" class="sixty" style="position:fixed;top:0;right:0;width:60px;height:60px;" title="Exit" onclick="wppaOvlHide()" >'+wppaSvgHtml("Exit-Big","60px",!0,!1,0,0,0,0)+"</span>"),wppaOvlSmallBrowse&&(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||"global"==wppaFsPolicy&&wppaOvlBigBrowse)||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(document).ready(function(p){jQuery(window).on("resize",function(){wppaOvlResize()})}),jQuery(window).on("orientationchange",function(){wppaOvlOpen&&setTimeout(function(){wppaOvlShowSame()},200)});
// wppa-popup
var wppaJsPopupVersion="9.0.00.006";function wppaPopUp(p,t,i,e,a,n,o,r,d,s){wppaPopDown();var l=jQuery("#wppa-thumb-area-"+p).width(),e=(e?'<div id="wppa-name-'+p+'" style="display:none; padding:1px;" class="wppa_pu_info">'+e+"</div>":"")+(a?'<div id="wppa-desc-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+a+"</div>":"")+(n?'<div id="wppa-rat-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+n+"</div>":"")+(o?'<div id="wppa-ncom-'+p+'" style="clear:both; display:none; padding:1px;" class="wppa_pu_info">'+o+"</div>":""),a=jQuery(t).css("cursor"),n=(wppaThumbTargetBlank,jQuery(t).parent().attr("href")),o=n?'<a href="'+n+'" >':"";o+=""!=r?r:'<img id="wppa-img-'+p+'" src="'+t.src+'" title="" style="border-width: 0px;" />',o+=n?"</a>":"",jQuery("#wppa-popup-"+p).html('<div class="wppa-popup" style="background-color:'+wppaBackgroundColorImage+';box-sizing:content-box;text-align:center;">'+o+e+"</div>"),jQuery(".wppa-popup").on("click",function(){return jQuery(t).trigger("click"),!1}),jQuery(".wppa-popup").css({cursor:a}),n=parseInt(d),o=parseInt(s),jQuery(".wppa-popup").css({width:t.clientWidth}),e=parseInt(t.offsetLeft)-7-5,a=parseInt(t.offsetTop)-7-2,jQuery("#grid-item-"+p+"-"+i).length&&(e+=parseInt(jQuery("#grid-item-"+p+"-"+i).css("left"))+6,a+=parseInt(jQuery("#grid-item-"+p+"-"+i).css("top"))),d=parseInt(t.clientWidth),s=parseInt(t.clientHeight),(i=e-parseInt((n-d)/2))<0&&(i=0),l<i+n+16&&(i=l-n-16),(l=a-parseInt((o-s)/2))<0&&(l=0),jQuery("#wppa-img-"+p).css({maxWidth:n}),jQuery("#wppa-popup-"+p).css({marginLeft:e,marginTop:a}),jQuery("#wppa-img-"+p).css({marginLeft:0,marginRight:0,width:d,height:s});s=500;wppaAnimate("#wppa-popup-"+p,{marginLeft:i,marginTop:l},s,wppaEasingPopup),wppaAnimate("#wppa-img-"+p,{width:n,height:o},s,wppaEasingPopup,function(){jQuery(this).on("touchend",function(){wppaPopDown()}),jQuery(this).on("click",function(p){p.stopPropagation})}),wppaAnimate(".wppa-popup",{width:n},s,wppaEasingPopup),wppaAnimate(".wppa_pu_info",{width:n},s,wppaEasingPopup,function(){jQuery(".wppa_pu_info").show()}),wppaProtect()}function wppaPopDown(){jQuery(".wppa-popup-frame").html("")}var wppaFullPopupBusy=!1;function wppaFullPopUp(p,t,i,e,a,n){var o,r,d;wppaFullPopupBusy||(wppaFullPopupBusy=!0,setTimeout(function(){wppaFullPopupBusy=!1},500),o=screen.width/(e+14),r=screen.height/(a+80),(d=.9*Math.min(o,r))<1&&(e*=d,a*=d),o=a+80,r=e+14,d="",(t=document.getElementById("i-"+t+"-"+p))&&(d=t.alt,t.title),p=".pdf"==i.substr(i.length-4,i.length),t=(new Date).getTime(),r=window.open("","Print-"+t,"width="+r+", height="+o+", location=no, resizable=no, menubar=yes "),d="<html><head><style>body{margin:0;padding:6px;background-color:"+wppaBackgroundColorImage+";text-align:center;}</style><title>"+d+'</title><script>function wppa_print() {document.getElementById( "wppa_printer" ).style.visibility="hidden";document.getElementById( "wppa_download" ).style.visibility="hidden";window.print();}<\/script></head><body><div style="width:'+e+'px;" >',d+=p?'<iframe src="'+i+'" style="padding-bottom:6px;width:100%;height:'+(o-60)+'px;" ></iframe><br />':'<img src="'+i+'" style="width:'+e+"px;height:"+a+'px;padding-bottom:6px;" /><br />',d+='<div style="text-align:center">'+n+"</div>",p||(d+='<a href="'+i+'" download="'+n+'" ><img src="'+wppaImageDirectory+'download.png" id="wppa_download" title="Download" style="position:absolute; top:6px; left:'+(e-66)+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" /></a><img src="'+wppaImageDirectory+'printer.png" id="wppa_printer" title="Print" style="position:absolute; top:6px; left:'+(e-30)+"px; background-color:"+wppaBackgroundColorImage+'; padding: 2px; cursor:pointer;" onclick="wppa_print();" />'),d+="</div></body></html>",r.document.write(d),wppaProtect())}
// wppa-touch
var wppaJsTouchVersion="8.5.01.009";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()),wppaFingerCount=p.touches.length,1==wppaFingerCount?(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))),wppaSwipeLength>=wppaMinLength&&(wppaCalculateAngle(),wppaDetermineSwipeDirection(),wppaProcessingRoutine())),wppaTouchCancel()}function wppaTouchCancel(){wppaFingerCount=0,wppaStartX=0,wppaStartY=0,wppaCurX=0,wppaCurY=0,wppaDeltaX=0,wppaDeltaY=0,wppaHorzDiff=0,wppaVertDiff=0,wppaSwipeLength=0,wppaSwipeAngle=null,wppaSwipeDirection=null,wppaTriggerElementID=null,wppaSwipeOnLightbox=!1,wppaSwipeMocc=0}function wppaCalculateAngle(){var p=wppaStartX-wppaCurX,e=wppaCurY-wppaStartY,p=(Math.round(Math.sqrt(Math.pow(p,2)+Math.pow(e,2))),Math.atan2(e,p));wppaSwipeAngle=Math.round(180*p/Math.PI),wppaSwipeAngle<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)}else"up"==wppaSwipeDirection||wppaSwipeDirection}wppaTouchCancel()}
// wppa-zoom
var wppaJsZoomVersion="9.0.08.002";function wppaDoZoomPan(e,t){wppaZoomData[e]=t;var n=g(e,{image:document.getElementById("wppa-"+t.itemId)});function v(t){var a,e,n,o,i,r=g(t);r.canvas&&(y()<r.time+10||(g(t,{time:y()}),(r.isLightbox&&!wppaOvlOpen||!r.isLightbox&&wppaOvlOpen)&&(r=g(0,{abort:!0})),r.abort?g(t,{manual:!1,buttondown:!1,pause:!1,ctx:null}):r.busy||(o=(r=g(t,{busy:!0})).fromX,i=r.fromY,r.manual||(r.fromX+=r.deltaX,r.fromY+=r.deltaY,a=r.fromHeight/r.deltaFactor,e=r.fromWidth/r.deltaFactor,50<a&&(wppaIsFs()||a<=r.image.height)?(r.fromX-=(e-r.fromWidth)/2,r.fromY-=(a-r.fromHeight)/2,r.fromWidth=e,r.fromHeight=a):r.buttondown=!1),r.fromX=Math.max(0,Math.min(r.image.width-r.fromWidth,r.fromX)),r.fromY=Math.max(0,Math.min(r.image.height-r.fromHeight,r.fromY)),o==r.fromX&&i==r.fromY&&1==r.deltaFactor&&(r.buttondown=!1),n=screen.width/screen.height,o=(1-r.image.width/r.fromWidth)*r.canvas.width/2,i=(1-r.image.height/r.fromHeight)*r.canvas.height/2,r.ctx=r.canvas.getContext("2d"),jQuery(r.canvas).css({display:"inline"}),n>r.imageRatio&&a>r.image.height&&wppaIsFs()||n<=r.imageRatio&&e>r.image.width&&wppaIsFs()?(r.enableManual=!1,r.ctx.clearRect(0,0,r.canvas.width,r.canvas.height),r.ctx.drawImage(r.image,r.fromX,r.fromY,r.fromWidth,r.fromHeight,o,i,r.canvas.width,r.canvas.height),jQuery(r.canvas).css({cursor:"default"})):(r.enableManual=!0,r.ctx.drawImage(r.image,r.fromX,r.fromY,r.fromWidth,r.fromHeight,0,0,r.canvas.width,r.canvas.height),jQuery(r.canvas).css({cursor:"grab"})),wppaIsFs()?(r.fsMaskTop=i-(r.canvas.height-screen.height)/2,r.fsMaskLeft=o-(r.canvas.width-screen.width)/2,r.fsMaskBottom=screen.height-r.fsMaskTop,r.fsMaskRight=screen.width-r.fsMaskLeft):(r.fsMaskTop=0,r.fsMaskLeft=0,r.fsMaskBottom=0,r.fsMaskRight=0),r.ctrlbarUpdate&&(setTimeout(function(){wppaAdjustControlbar(t)},100),r.ctrlbarUpdate=!1),r.busy=!1,wppaIsElementInViewport(r.canvas)||(r.buttondown=!1),g(t,r),r.pause||!r.manual&&!r.buttondown||setTimeout(function(){v(t)},10),r.pause&&g(t,{pause:!1}),wppaHasControlbar=!0,wppaAdjustControlbar(t))))}function a(t,a){var e=g(t);if(e){if(e.isLightbox){jQuery("#wppa-overlay-zpc").css("display","");var n,o=!wppaIsFs(),i=o?(f=window.innerWidth||screen.width,window.innerHeight||screen.height):(f=screen.width,screen.height),r=0,s=8,c=8+(e.controls?e.icsize+10:0)+10;o?(s+=2*e.borderWidth,c+=2*e.borderWidth):s=40,h=o?i-c>(f-s)/e.imageRatio:(screenRatio=screen.width/screen.height,screenRatio<e.imageRatio),o&&h&&(r=(i-(n=(l=f-s)/e.imageRatio)-c)/2+20),o&&!h&&(n=(l=e.imageRatio*(i-(e.controls?e.icsize:0)-48))/e.imageRatio,r=20),!o&&h&&(l=(n=screen.height)*e.imageRatio,r=0),o||h||(n=(l=screen.width)/e.imageRatio,r=(screen.height-n)/2),jQuery("#wppa-ovl-zoom-container").css({top:r}),jQuery("#wppa-overlay-zpc").css({top:0,left:0}),e.canvasWidth=l,e.canvasHeight=n,e.canvas.width=e.canvasWidth,e.canvas.height=e.canvasHeight,o?(jQuery("#wppa-ovl-zoom-container").css({backgroundColor:e.backgroundColor,padding:e.padding,borderRadius:e.borderRadius+"px",borderWidth:e.borderWidth+"px",width:l,marginLeft:0}),h?jQuery("#wppa-overlay-zpc").css({left:4}):jQuery("#wppa-overlay-zpc").css({left:(f-l)/2})):(jQuery("#wppa-overlay-zpc").css({marginLeft:0}),jQuery("#wppa-ovl-zoom-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",borderWidth:"0px",width:l,left:(f-l)/2,position:"fixed"})),e.ctrlbarUpdate=!0}else{if(e.slide){var u=wppaGetContainerWidth(t);if("force"!=a&&e.oldcw==u)return;var d,p,m=wppaAspectRatio[t],o=1/e.imageRatio,h=wppaPortraitOnly[t],f=e.pancontrolheight;0<f&&(f+=5);var l=u*o;if(m*u<(l+=f)&&!h){e.canvasHeight=u*m-f,e.canvasWidth=e.canvasHeight/o,e.oldcw=u,e.ctrlbarUpdate=!1,d=u*m,p=u,jQuery("#slide_frame-"+t).css({height:d,width:p}),jQuery(e.pctldiv).css({width:p});h=wppaFullHalign[t];switch(void 0===h&&(h="none"),h){case"left":break;case"right":jQuery("#wppa-pan-canvas-"+e.itemId).css({marginLeft:u-e.canvasWidth});break;case"center":default:jQuery("#wppa-pan-canvas-"+e.itemId).css({marginLeft:(u-e.canvasWidth)/2})}}else{e.canvasWidth=u,e.oldcw=u,e.ctrlbarUpdate=!1,d=u*m,p=u,jQuery("#slide_frame-"+t).css({height:d,width:p});var w=u*o+f,f=wppaFullValign[t];switch(void 0===f&&(f="none"),f){case"center":jQuery("#wppa-pan-canvas-"+e.itemId).css({marginTop:(d-w)/2}),jQuery("#slide_frame-"+t).css({height:u*m});break;case"bottom":jQuery("#wppa-pan-canvas-"+e.itemId).css({marginTop:d-w}),jQuery("#slide_frame-"+t).css({height:u*m});break;case"top":jQuery("#slide_frame-"+t).css({height:u*m});break;case"fit":jQuery("#slide_frame-"+t).css({height:w})}}}else{if("force"!=a&&e.canvasWidth==jQuery(e.div).parent().width())return;e.canvasWidth=jQuery(e.div).parent().width(),e.ctrlbarUpdate=!0}e.canvasHeight=e.canvasWidth/e.imageRatio,e.canvas.width=e.canvasWidth,e.canvas.height=e.canvasHeight,jQuery("#wppa-pctl-div-"+t).css({width:u})}g(t,e),setTimeout(function(){v(t)},1),jQuery("#wppa-ovl-zoom-container").show()}}function o(t){var a=g(t),a=a.image.naturalWidth/a.canvas.width;a<1.5&&(a=1.5),g(t,{deltaX:a*=1.5,buttondown:!0,manual:!1}),v(t)}function i(t){var a=g(t),a=a.image.naturalWidth/a.canvas.width;a<1.5&&(a=1.5),g(t,{deltaX:-(a*=1.5),buttondown:!0,manual:!1}),v(t)}function r(t){var a=g(t),a=a.image.naturalHeight/a.canvas.height;a<1.5&&(a=1.5),g(t,{deltaY:-(a*=1.5),buttondown:!0,manual:!1}),v(t)}function s(t){var a=g(t),a=a.image.naturalHeight/a.canvas.height;a<1.5&&(a=1.5),g(t,{deltaY:a*=1.5,buttondown:!0,manual:!1}),v(t)}function c(t){g(t,{deltaFactor:1.005,buttondown:!0,manual:!1}),v(t)}function u(t){g(t,{deltaFactor:.995,buttondown:!0,manual:!1}),v(t)}function p(t){g(t,{deltaX:0,deltaY:0,deltaFactor:1,buttondown:!1})}function m(t,a){var e=g(t),n=l(a).X,o=l(a).Y;if(wppaIsFs()&&e.isLightbox&&(n<e.fsMaskLeft||n>e.fsMaskRight||o<e.fsMaskTop||o>e.fsMaskBottom))return g(0,{abort:!0}),void jQuery("#wppa-overlay-bg").trigger("click");e.enableManual&&(g(t,{manual:!0,savedCanvasX:n=w(t,a).X,savedCanvasY:o=w(t,a).Y,buttondown:!1}),v(t))}function h(t,a){a.preventDefault(),a.stopPropagation();var e,n=g(t),o=w(t,a).X,i=w(t,a).Y;n.manual&&(e=n.canvas.width/n.fromWidth,a=(n.savedCanvasX-o)/e+n.fromX,e=(n.savedCanvasY-i)/e+n.fromY,0<a&&0<e&&a+n.fromWidth<n.image.width&&e+n.fromHeight<n.image.height&&g(t,{fromX:a,fromY:e,savedCanvasX:o,savedCanvasY:i}))}function f(t){g(t,{manual:!1})}function g(t,a){if(!wppaZoomData[t])return!1;if(a)for(var e in a)wppaZoomData[t][e]=a[e];return wppaZoomData[t]}function l(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 w(t,a){var e;return a=a.touches?(t=g(t),e=a.touches[0].screenX-t.fsMaskLeft,a.touches[0].screenY-t.fsMaskTop):(e=a.offsetX,a.offsetY),{X:e,Y:a}}function y(){return d=new Date,d.getTime()}n.manual=!1,n.deltaX=0,n.deltaY=0,n.deltaFactor=1,n.busy=!1,n.div=jQuery("#wppa-pan-div-"+n.itemId),n.canvas=document.getElementById("wppa-pan-canvas-"+n.itemId),n.pctldiv=jQuery("#wppa-pctl-div-"+n.itemId),n.left=jQuery("#wppa-pctl-left-"+n.itemId),n.right=jQuery("#wppa-pctl-right-"+n.itemId),n.up=jQuery("#wppa-pctl-up-"+n.itemId),n.down=jQuery("#wppa-pctl-down-"+n.itemId),n.zoomin=jQuery("#wppa-pctl-zoomin-"+n.itemId),n.zoomout=jQuery("#wppa-pctl-zoomout-"+n.itemId),n.prev=jQuery("#wppa-pctl-prev-"+n.itemId),n.next=jQuery("#wppa-pctl-next-"+n.itemId),n.exit=jQuery("#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.oldcw=0,n.right.on("touchstart",function(t){o(e)}),n.right.on("touchend",function(t){p(e)}),n.left.on("touchstart",function(t){i(e)}),n.left.on("touchend",function(t){p(e)}),n.up.on("touchstart",function(t){r(e)}),n.up.on("touchend",function(t){p(e)}),n.down.on("touchstart",function(t){s(e)}),n.down.on("touchend",function(t){p(e)}),n.zoomin.on("touchstart",function(t){c(e)}),n.zoomin.on("touchend",function(t){p(e)}),n.zoomout.on("touchstart",function(t){u(e)}),n.zoomout.on("touchend",function(t){p(e)}),n.canvas.addEventListener("touchstart",function(t){m(e,t)}),n.canvas.addEventListener("touchmove",function(t){h(e,t)}),n.canvas.addEventListener("touchend",function(t){f(e)}),n.canvas.addEventListener("mousedown",function(t){m(e,t)}),n.canvas.addEventListener("mousemove",function(t){h(e,t)}),n.canvas.addEventListener("mouseup",function(t){f(e)}),n.canvas.addEventListener("mouseleave",function(t){(n=g(e)).manual&&g(e,{pause:!0})}),n.canvas.addEventListener("mouseenter",function(t){var a;g(a=e,{pause:!1}).manual&&v(a)}),document.getElementById("wppa-pan-canvas-"+n.itemId).addEventListener("wheel",function(t){var a;a=e,(t=t).preventDefault(),t.stopPropagation(),n=g(a),g(a,{deltaFactor:1+t.deltaY*n.zoomsensitivity/1e4,manual:!1,burrondown:!1}),v(a),setTimeout(function(){g(a,{deltaFactor:1})},25)}),n.right.on("mousedown",function(t){o(e)}),n.right.on("mouseup",function(t){p(e)}),n.left.on("mousedown",function(t){i(e)}),n.left.on("mouseup",function(t){p(e)}),n.up.on("mousedown",function(t){r(e)}),n.up.on("mouseup",function(t){p(e)}),n.down.on("mousedown",function(t){s(e)}),n.down.on("mouseup",function(t){p(e)}),n.zoomin.off("mousedown"),n.zoomin.on("mousedown",function(t){c(e)}),n.zoomin.off("mouseup"),n.zoomin.on("mouseup",function(t){p(e)}),n.zoomout.on("mousedown",function(t){u(e)}),n.zoomout.on("mouseup",function(t){p(e)}),jQuery("body").on("quitimage",function(t,a){void 0!==a&&a!=e||(a=e,clearTimeout(n.timer),wppaZoomData[a]=[],n=g(a,{abort:!0,autorun:!1}),jQuery("#wppa-pan-canvas-"+n.itemId).html(""),jQuery("#wppa-pctl-div-"+n.itemId).html(""),jQuery("#wppa-ovl-zoom-container").html(""))}),n.isLightbox&&jQuery("#wppa-pctl-div-"+n.itemId).on("click",function(t){wppaKillEvent(t)}),n.isLightbox?(jQuery(window).off("resize",wppaOvlShowSame),jQuery(window).on("resize",wppaOvlShowSame)):jQuery(window).on("wpparesizeend",function(t){a(e,t)}),a(e,"force"),n.initialized=!0,g(e,n),jQuery("#wppa-ovl-spin").hide(),wppaProtect()}
// wppa-spheric
var wppaJsSphericVersion="8.5.03.007";function wppaDoSphericPan(t,e){e&&(wppaSphericData[t]=e);var s=f(t,s);function w(e){var n=f(e);!n.manCtrl&&v()<n.time+25||(f(e,{time:v()}),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),wppaHasControlbar=!0,wppaAdjustControlbar(e),jQuery("#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,n){var t=!wppaIsFs();if(s=f(e)){if(s.isLightbox){if(!wppaOvlOpen)return;jQuery("#wppa-overlay-pc").show(),jQuery("#wppa-overlay-pc").css("width","");var a=(t=!wppaIsFs())?(u=window.innerWidth||screen.width,window.innerHeight||screen.height):(u=screen.width,screen.height),o=8,p=8+(s.controls?s.icsize+10:0)+30;t&&(o+=2*s.borderWidth,p+=2*s.borderWidth),i=(u-o)/2+p<a,p=t?i?(a-(r=(c=u-o)/2)-p)/2+20:(c=2*(r=a-p),20):(c=screen.width,r=screen.height,0),s.aspect=c/r,jQuery("#wppa-ovl-sphericpan-container").css({top:p}),jQuery("#wppa-overlay-pc").css({top:0}),t?(jQuery("#wppa-ovl-sphericpan-container").css({backgroundColor:s.backgroundColor,padding:s.padding+"px",borderRadius:s.borderRadius+"px",width:c}),i?jQuery("#wppa-overlay-pc").css({left:4}):jQuery("#wppa-overlay-pc").css({left:(u-c)/2})):jQuery("#wppa-ovl-sphericpan-container").css({backgroundColor:"transparent",padding:0,borderRadius:"0px",width:c,left:(u-c)/2}),s.wppaRenderer.setSize(c,r)}else{var r,i=wppaGetContainerWidth(e),u=s.pancontrolheight,c=i;if(r=parseInt(c/2),"force"!=n&&0<s.width&&s.width==c&&s.height==r)return;if(s.slide&&(0<(u=s.pancontrolheight)&&(u+=5),r=c*wppaAspectRatio[e]-u,jQuery("#wppa-pctl-div-"+e).css({width:i}),jQuery("#slide_frame-"+e).css({height:r+u})),!s.wppaRenderer)return;s.wppaRenderer.setSize(c,r)}s.width=c,s.height=r,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 r(e){s=f(e),f(e,{dFov:-.4*s.mFakt,butDown:!0}),w(e)}function i(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 c(e){s=f(e),f(e,{dX:-.2*s.mFakt,butDown:!0}),w(e)}function l(e){s=f(e),f(e,{dY:.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,{dX:0,dY:0,dFov:0,butDown:!1,manCtrl:!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 v(){return d=new Date,d.getTime()}s.initialized||s.abort||s.isLightbox&&!wppaOvlOpen||(s.wppaRenderer&&(s.wppaRenderer.state.reset(),s.wppaSphere.dispose(),s.wppaSphereMaterial.dispose(),s.texture.dispose()),s.isLightbox&&wppaOvlOpen&&(jQuery("#wppa-ovl-spin").show(),jQuery("#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=jQuery("#wppa-pan-div-"+t),s.left=jQuery("#wppa-pctl-left-"+t),s.right=jQuery("#wppa-pctl-right-"+t),s.up=jQuery("#wppa-pctl-up-"+t),s.down=jQuery("#wppa-pctl-down-"+t),s.zoomin=jQuery("#wppa-pctl-zoomin-"+t),s.zoomout=jQuery("#wppa-pctl-zoomout-"+t),s.prev=jQuery("#wppa-pctl-prev-"+t),s.next=jQuery("#wppa-pctl-next-"+t),s.pause=!1,s.mFakt=wppaIsMobile?"2":"1",s.time=0,s.isLightbox&&(wppaGlobalOvlPanoramaId++,s.uId=wppaGlobalOvlPanoramaId),jQuery(s.div).html(""),s.wppaRenderer||(s.wppaRenderer=new THREE.WebGLRenderer),s.wppaRenderer.setSize(s.width,s.height),jQuery(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){m(t)}),s.left.on("touchstart",function(e){c(t)}),s.left.on("touchend",function(e){m(t)}),s.up.on("touchstart",function(e){l(t)}),s.up.on("touchend",function(e){m(t)}),s.down.on("touchstart",function(e){h(t)}),s.down.on("touchend",function(e){m(t)}),s.zoomin.on("touchstart",function(e){r(t)}),s.zoomin.on("touchend",function(e){m(t)}),s.zoomout.on("touchstart",function(e){i(t)}),s.zoomout.on("touchend",function(e){m(t)}),s.enableManual&&0<jQuery("#wppa-pan-div-"+t+" canvas").length&&(jQuery("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchstart",function(e){a(t,e)}),jQuery("#wppa-pan-div-"+t+" canvas")[0].addEventListener("touchmove",function(e){e.stopPropagation(),o(t,e)}),jQuery("#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){m(t)}),s.left.on("mousedown",function(e){c(t)}),s.left.on("mouseup",function(e){m(t)}),s.up.on("mousedown",function(e){l(t)}),s.up.on("mouseup",function(e){m(t)}),s.down.on("mousedown",function(e){h(t)}),s.down.on("mouseup",function(e){m(t)}),s.zoomin.off("mousedown"),s.zoomin.on("mousedown",function(e){r(t)}),s.zoomin.off("mouseup"),s.zoomin.on("mouseup",function(e){m(t)}),s.zoomout.on("mousedown",function(e){i(t)}),s.zoomout.on("mouseup",function(e){m(t)}),s.enableManual&&0<jQuery("#wppa-pan-div-"+t+" canvas").length&&(jQuery("#wppa-pan-div-"+t+" canvas").on("mousedown",function(e){a(t,e)}),jQuery("#wppa-pan-div-"+t+" canvas").on("mousemove",function(e){o(t,e)}),jQuery("#wppa-pan-div-"+t+" canvas").on("mouseup",function(e){p(t)}),jQuery("#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/60}),w(n),setTimeout(function(){f(n,{dFov:0})},25)})),jQuery("body").on("quitimage",function(e,n){void 0!==n&&n!=t||(n=t,clearTimeout(s.timer),wppaSphericData[n]=[],s=f(n,{abort:!0,autorun:!1}),jQuery("#wppa-pan-div-"+n+" canvas").html(""),jQuery("#wppa-pctl-div-"+n).html(""),jQuery("#wppa-overlay-pc").html(""))}),s.isLightbox&&jQuery("#wppa-pctl-div-"+t).on("click",function(e){wppaKillEvent(e)}),f(t,s),jQuery(window).on("wpparesizeend",function(e){n(t,e)}),wppaProtect(),jQuery(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)}),n(t,"force"))}
// wppa-flatpan
var wppaJsFlatPanVersion="9.0.08.002";function wppaDoFlatPanorama(i,t){wppaFlatpanData[i]=t;var n=v(i,{image:document.getElementById("wppa-"+t.itemId)});function s(t){var a,n,e,o=v(t);if(o.canvas){if(o.isLightbox)wppaOvlOpen||(o.abort=!0);else if(!wppaIsElementInViewport(o.canvas))return void setTimeout(function(){s(t)},200);o.abort?v(t,{ctx:null,prevctx:null}):0!=o.run&&(d=new Date,a=d.getTime(),o.autorun&&a<o.wppaFlatLastRenderTime+25||(o.wppaFlatLastRenderTime=a,o.manualControl||(o.fromX+=o.deltaX,o.fromY+=o.deltaY,e=o.fromHeight/o.deltaFactor,n=o.fromWidth/o.deltaFactor,1!=o.deltaFactor&&e<=o.image.height&&50<e&&(o.fromX-=(n-o.fromWidth)/o.ratio,o.fromY-=(e-o.fromHeight)/o.ratio,o.fromWidth=n,o.fromHeight=e)),o.fromX=Math.max(0,Math.min(o.image.width-o.fromWidth,o.fromX)),o.fromY=Math.max(0,Math.min(o.image.height-o.fromHeight,o.fromY)),o.autorun&&(0!=o.fromX&&o.fromX!=o.image.width-o.fromWidth||(o.deltaX*=-1)),o.canvas.getContext("2d").drawImage(o.image,o.fromX,o.fromY,o.fromWidth,o.fromHeight,0,0,o.canvas.width,o.canvas.height),jQuery(o.canvas).css({display:"inline"}),o.prevCanvas&&((n=o.prevCanvas.getContext("2d")).clearRect(0,0,o.prevCanvas.width,o.prevCanvas.height),n.drawImage(o.image,0,0,o.image.width,o.image.height,0,0,o.prevCanvas.width,o.prevCanvas.height),jQuery(o.prevCanvas).css({display:"inline"}),e=o.prevCanvas.width/o.image.width,n.strokeRect(e*o.fromX,e*o.fromY,e*o.fromWidth,e*o.fromHeight)),0<o.run&&(timer=setTimeout(function(){s(t)},25)),o.run<5&&o.run--,wppaHasControlbar=!0,wppaAdjustControlbar(t),v(t,o)))}}function a(t){var a,n,e,o,i,r,u=v(t);u.abort||(u.isLightbox?(jQuery("#wppa-overlay-fpc").css("display",""),a=(o=!wppaIsFs())?(r=window.innerWidth||screen.width,window.innerHeight||screen.height):(r=screen.width,screen.height),n=8,e=24+(u.controls?u.icsize:0)+r*u.height/u.width+40,o&&(n+=2*u.padding,e+=2*u.padding),a=(i=a>r/u.ratio+e)?(newWidth=r-n,newHeight=newWidth/u.ratio,(a-newHeight-e)/2+20):(newWidth=u.ratio*(a-(u.controls?u.icsize:0)-24-40)/(1+2*u.height/u.width),newHeight=newWidth/u.ratio,20),jQuery("#wppa-ovl-flatpan-container").css({top:a,marginTop:0}),u.canvas.width=newWidth,u.canvas.height=newHeight,u.prevCanvas&&(u.prevCanvas.width=newWidth,u.prevCanvas.height=newWidth*u.height/u.width),o?(jQuery("#wppa-ovl-flatpan-container").css({backgroundColor:u.backgroundColor,padding:u.padding,borderRadius:u.borderRadius,width:newWidth,marginLeft:0}),i?jQuery("#wppa-overlay-fpc").css({left:4}):jQuery("#wppa-overlay-fpc").css({left:(r-newWidth)/2})):(jQuery("#wppa-overlay-fpc").css({marginLeft:0}),jQuery("#wppa-ovl-flatpan-container").css({backgroundColor:"transparent",padding:0,borderRadius:0,width:newWidth,left:(r-newWidth)/2})),wppaAdjustControlbar(t)):(u.slide?(o=wppaGetContainerWidth(t),0<(i=u.pancontrolheight)&&(i+=5),r=wppaAspectRatio[t],u.canvasWidth=o,u.canvasHeight=o*r-i,jQuery(u.pctldiv).css({width:o}),jQuery("#slide_frame-"+t).css({height:u.canvasHeight+i})):(u.canvasWidth=jQuery(u.div).parent().width(),u.canvasHeight=u.canvasWidth/u.ratio),u.canvas.width=u.canvasWidth,u.canvas.height=u.canvasHeight,u.prevCanvas&&(u.prevCanvas.width=u.canvasWidth,u.prevCanvas.height=u.canvasWidth*u.height/u.width)),u.run=u.autorun?5:4,v(t,u),s(t))}function e(t){v(t,{autorun:!1,run:5,deltaX:3,deltaY:0}),s(t)}function o(t){v(t,{autorun:!1,run:5,deltaX:-3,deltaY:0}),s(t)}function r(t){v(t,{autorun:!1,run:5,deltaX:0,deltaY:-3}),s(t)}function u(t){v(t,{autorun:!1,run:5,deltaX:0,deltaY:3}),s(t)}function p(t){v(t,{deltaX:0,deltaY:0,autorun:!1,run:5,deltaFactor:1.005}),s(t)}function f(t){v(t,{deltaX:0,deltaY:0,autorun:!1,run:5,deltaFactor:.995}),s(t)}function c(t,a){a.preventDefault(),v(t,{autorun:!1,deltaX:0,deltaY:0,deltaFactor:1,run:4})}function h(t,a){a.preventDefault(),v(t,{manualControl:!0,autorun:!1,deltaX:0,savedCanvasX:a.offsetX,savedCanvasY:a.offsetY,run:5}),s(t)}function m(t){v(t).manualControl&&v(t,{run:4,manualControl:!1})}function v(t,a){if(!wppaFlatpanData[t])return!1;if(a)for(var n in a)wppaFlatpanData[t][n]=a[n];return wppaFlatpanData[t]}n.ratio=n.slide?1/wppaAspectRatio[i]:2,n.manualControl=!1,n.deltaY=0,n.deltaFactor=1,n.run=n.deltaX?5:4,n.abort=!1,n.div=jQuery("#wppa-pan-div-"+i),n.canvas=document.getElementById("wppa-pan-canvas-"+i),n.prevCanvas=document.getElementById("wppa-pan-prev-canvas-"+i),n.pctldiv=jQuery("#wppa-pctl-div-"+i),n.left=jQuery("#wppa-pctl-left-"+i),n.right=jQuery("#wppa-pctl-right-"+i),n.up=jQuery("#wppa-pctl-up-"+i),n.down=jQuery("#wppa-pctl-down-"+i),n.zoomin=jQuery("#wppa-pctl-zoomin-"+i),n.zoomout=jQuery("#wppa-pctl-zoomout-"+i),n.prev=jQuery("#wppa-pctl-prev-"+i),n.next=jQuery("#wppa-pctl-next-"+i),n.canvasWidth=jQuery(n.div).parent().width(),n.canvasHeight=n.canvasWidth/n.ratio,n.savedCanvasX=0,n.savedCanvasY=0,n.fromHeight=n.image.height/n.ratio,n.fromWidth=n.fromHeight*n.ratio,n.fromX=(n.image.width-n.fromWidth)/n.ratio,n.fromY=(n.image.height-n.fromHeight)/n.ratio,n.centerX=n.fromX+n.fromWidth/n.ratio,n.centerY=n.fromY+n.fromHeight/n.ratio,n.wppaFlatLastRenderTime=0,n.right.on("touchstart",function(t){e(i)}),n.right.on("touchend",function(t){c(i,t)}),n.left.on("touchstart",function(t){o(i)}),n.left.on("touchend",function(t){c(i,t)}),n.up.on("touchstart",function(t){r(i)}),n.up.on("touchend",function(t){c(i,t)}),n.down.on("touchstart",function(t){u(i)}),n.down.on("touchend",function(t){c(i,t)}),n.zoomin.on("touchstart",function(t){p(i)}),n.zoomin.on("touchend",function(t){c(i,t)}),n.zoomout.on("touchstart",function(t){f(i)}),n.zoomout.on("touchend",function(t){c(i,t)}),n.manual&&(n.canvas.addEventListener("mousedown",function(t){h(i,t)}),n.canvas.addEventListener("mousemove",function(t){var a,n,e,o;n=t,(o=v(a=i)).manualControl&&(v(a,{autorun:!1,deltaX:0}),e=o.canvas.width/o.fromWidth,t=(o.savedCanvasX-n.offsetX)/e+o.fromX,e=(o.savedCanvasY-n.offsetY)/e+o.fromY,0<t&&0<e&&t+o.fromWidth<o.image.width&&e+o.fromHeight<o.image.height&&v(a,{fromX:t,fromY:e,savedCanvasX:n.offsetX,savedCanvasY:n.offsetY}))}),n.canvas.addEventListener("mouseup",function(t){m(i)}),n.canvas.addEventListener("mouseout",function(t){m(i)}),document.getElementById("wppa-pan-canvas-"+i).addEventListener("wheel",function(t){!function(t,a){a.preventDefault(),a.stopPropagation();var n=v(t);v(t,{deltaX:0,deltaY:0,autorun:!1,run:4,deltaFactor:1+a.deltaY*n.zoomsensitivity/1e4}),s(t),setTimeout(function(){v(t,{deltaFactor:1})},25)}(i,t)}),n.prevCanvas&&(n.prevCanvas.addEventListener("mousedown",function(t){h(i,t)}),n.prevCanvas.addEventListener("mousemove",function(t){var a,n,e;n=t,e=v(a=i),t=e.prevCanvas.width/e.image.width,n.offsetX>t*e.fromX&&n.offsetX<t*(e.fromX+e.fromWidth)&&n.offsetY>t*e.fromY&&n.offsetY<t*(e.fromY+e.fromHeight)?jQuery(e.prevCanvas).css("cursor","grab"):jQuery(e.prevCanvas).css("cursor","default"),e.manualControl&&(e.autorun=!1,e.deltaX=0,n.offsetX>t*e.fromX&&n.offsetX<t*(e.fromX+e.fromWidth)&&n.offsetY>t*e.fromY&&n.offsetY<t*(e.fromY+e.fromHeight)&&(e.fromX=(n.offsetX-e.savedCanvasX)/t+e.fromX,e.fromY=(n.offsetY-e.savedCanvasY)/t+e.fromY,e.savedCanvasX=n.offsetX,e.savedCanvasY=n.offsetY)),v(a,e)}),n.prevCanvas.addEventListener("mouseup",function(t){m(i)}),n.prevCanvas.addEventListener("mouseout",function(t){m(i)}))),n.right.on("mousedown",function(t){e(i)}),n.right.on("mouseup",function(t){c(i,t)}),n.left.on("mousedown",function(t){o(i)}),n.left.on("mouseup",function(t){c(i,t)}),n.up.on("mousedown",function(t){r(i)}),n.up.on("mouseup",function(t){c(i,t)}),n.down.on("mousedown",function(t){u(i)}),n.down.on("mouseup",function(t){c(i,t)}),n.zoomin.on("mousedown",function(t){p(i)}),n.zoomin.on("mouseup",function(t){c(i,t)}),n.zoomout.on("mousedown",function(t){f(i)}),n.zoomout.on("mouseup",function(t){c(i,t)}),jQuery("body").on("quitimage",function(t,a){void 0!==a&&a!=i||(a=i,clearTimeout(n.timer),wppaFlatpanData[a]=[],n=v(a,{abort:!0,run:0,autorun:!1}),jQuery(n.canvas).html(""),jQuery(n.prevCanvas).html(""),jQuery("#wppa-pctl-div-"+a).html(""))}),n.isLightbox&&jQuery("#wppa-pctl-div-"+n.itemId).on("click",function(t){wppaKillEvent(t)}),n.isLightbox?(jQuery(window).off("resize",wppaOvlShowSame),jQuery(window).on("resize",wppaOvlShowSame)):jQuery(window).on("resize",function(t){a(i)}),v(i,n),a(i),jQuery("#wppa-ovl-spin").hide(),wppaProtect()}