WP Photo Album Plus - Version 8.0.00.005

Version Description

= 7.7.07 =

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

Release Info

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

Code changes from version 8.0.00.004 to 8.0.00.005

js/wppa-all.js CHANGED
@@ -1,5 +1,5 @@
1
  // wppa-utils
2
- var wppaDebug;wppaJsUtilsVersion="8.0.00.004";var wppaMakeLazyVisibleScrollEndTimer,wppaDebugCounter=0;function wppaAnimate(e,t,a,p,i){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css(t),i&&setTimeout(i,10)):jQuery(e).stop().animate(t,a,p,i)}function wppaFadeIn(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:""}),a&&setTimeout(a,10)):jQuery(e).stop().fadeIn(t,a)}function wppaFadeOut(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"none"}),a&&setTimeout(a,10)):jQuery(e).stop().fadeOut(t,a)}function wppaFadeTo(e,t,a,p){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"",opacity:a}),p&&setTimeout(p,10)):jQuery(e).stop().fadeTo(t,a,p)}function wppaTrim(e,t){e=wppaTrimLeft(e,t);return e=wppaTrimRight(e,t)}function wppaTrimLeft(e,t){var a,p,i,n,r,o,s;switch(typeof t){case"string":for(p=(a=e).length,i=t.length;i<=p&&a.substr(0,i)==t;)p=(a=a.substr(i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<t.length;)s=wppaTrimLeft(s,t[n]),n++;r=o==s}a=s;break;default:return e.replace(/^\s\s*/,"")}return a}function wppaTrimRight(e,t){var a,p,i,n,r,o,s;switch(typeof t){case"string":for(p=(a=e).length,i=t.length;i<=p&&a.substr(p-i)==t;)p=(a=a.substr(0,p-i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<t.length;)s=wppaTrimRight(s,t[n]),n++;r=o==s}a=s;break;default:return e.replace(/\s\s*$/,"")}return a}function wppa_setCookie(e,t,a){var p=new Date;p.setDate(p.getDate()+a);p=escape(t)+(null==a?"":"; expires="+p.toUTCString());document.cookie=e+"="+p}function wppa_getCookie(e){for(var t,a,p=document.cookie.split(";"),i=0;i<p.length;i++)if(t=p[i].substr(0,p[i].indexOf("=")),a=p[i].substr(p[i].indexOf("=")+1),(t=t.replace(/^\s+|\s+$/g,""))==e)return unescape(a);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,t){var a,p,i;"undefined"==typeof console||!wppaDebug&&"force"!=t||(a=(new Date).getTime()%864e5,a-=60*(p=Math.floor(a/36e5))*60*1e3,a-=60*(i=Math.floor(a/6e4))*1e3,t=Math.floor(a/1e3),console.log("At: "+p+":"+i+":"+t+"."+(a-=1e3*t)+" message: "+e))}function wppaSvgHtml(e,t,a,p,i,n,r,o){var s;switch(i=i||"0",n=n||"10",r=r||"20",o=o||"50",wppaSvgCornerStyle){case"gif":case"none":radius=i;break;case"light":radius=n;break;case"medium":radius=r;break;case"heavy":radius=o}t=t||"32px",a="Full-Screen"==e||"Exit-Full-Screen"==e?(s=wppaFsFillcolor,wppaFsBgcolor):a?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor),""==s&&(s="transparent"),""==a&&(a="transparent");var l='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="'+(t?"height:"+t+";":"")+"fill:"+s+";background-color:"+a+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":l+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":l+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":l+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":l+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":l+='<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":l+='<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":l+='<path d="M30,0H0V30H30V0z M9 4 L15 10 L21 4 L26 9 L20 15 L26 21 L21 26 L15 20 L9 26 L4 21 L10 15 L4 9Z" />';break;case"Full-Screen":l+='<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":l+='<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":l+='<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":l+='<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:l+='<path d="M30,0H0V30H30V0z" />'}return l+="</g></svg>"}function wppaMakeLazyVisibleScrollEnd(){clearTimeout(wppaMakeLazyVisibleScrollEndTimer),wppaMakeLazyVisibleScrollEndTimer=setTimeout(wppaMakeLazyVisible,wppaScrollEndDelay)}var wppaLastLazy=0,wppaLazyTimer=0,wppaLazyBusy=!1;function wppaMakeLazyVisible(){if(!wppaLazyBusy&&(wppaLazyBusy=!0,wppaInitMasonryPlus(),wppaLazyLoad)){var e,t=new Date,a=t.getTime();if(a<wppaLastLazy+250)return clearTimeout(wppaLazyTimer),wppaLazyTimer=setTimeout(function(){wppaMakeLazyVisible()},100),void(wppaLazyBusy=!1);wppaLastLazy=a,clearTimeout(wppaLazyTimer);var p=0;jQuery("*[data-src]").each(function(){e=jQuery(this).attr("data-src"),(wppaIsElementInViewport(this)||wppaIsMobile)&&(jQuery(this).attr("src",e),jQuery(this).removeAttr("data-src"),p++)}),0<p&&(wppaInitMasonryPlus(),jQuery("div").getNiceScroll&&setTimeout(function(){jQuery("div").getNiceScroll().resize()},500),setTimeout(function(){jQuery(".wppa-box").trigger("scroll")},250)),a=(t=new Date).getTime(),wppaLastLazy=a,wppaLazyBusy=!1}}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 t=jQuery(e);t[0]&&"BODY"!=t[0].nodeName;){if("none"==jQuery(t[0]).css("display"))return!1;t=jQuery(t[0]).parent()}"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);e=e.getBoundingClientRect();return!e||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))}function wppaIconSize(e,t,a){a=a?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==a?t:(wppaIsMini[e]?a/2:a)+"px;"}function wppaEntityDecode(e){return e=(e=(e=(e=(e=e.split("&amp;").join("&")).split("&gt;").join(">")).split("&lt;").join("<")).split("&quot;").join('"')).split("&#39;").join("'")}function wppaSetMaxWidthToParentWidth(e){var t=e.parentNode.clientWidth;jQuery(e).css({maxWidth:t})}function wppaWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function wppaWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}function wppaAdjustControlbar(){var e,t,a=jQuery;wppaOvlOpen&&(t=wppaIsFs()?(a(".wppa-pctl-div-lb").css({position:"fixed",left:0,right:0,bottom:0}),screen.width):(a(".wppa-pctl-div-lb").css({position:"initial"}),a("#wppa-ovl-pan-container").width()),wppaIsMobile&&wppaIsFs()&&(t-=20),t<12*(parseInt(wppaOvlIconSize)+4)?0<(e=parseInt(t/12-4))&&(a(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),a(".wppa-pctl-div-lb").find("span").css({height:e,width:e})):(e=wppaOvlIconSize,a(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),a(".wppa-pctl-div-lb").find("span").css({height:e,width:e})),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()?a(".wppa-pctl-div-lb").css({paddingLeft:10,paddingRight:10}):a(".wppa-pctl-div-lb").css({paddingLeft:0,paddingRight:0}),a(".wppa-pctl-div-lb").css({visibility:"visible"}))}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,t,a){},error:function(e,t,a){wppaConsoleLog("wppaServerLog failed. Error = "+a+", status = "+t,"force")}})}function wppaTimNow(){return(new Date).getTime()}
3
  // wppa
4
  wppaWppaVer="8.0.00.001";var wppaIsChrome=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime),wppaIsSafari=!1,wppaOvlActivePanorama=0,wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth,wppaAutoColumnWidth=wppaAutoColumnWidth||[],wppaAutoColumnFrac,wppaAutoColumnFrac=wppaAutoColumnFrac||[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth,wppaColWidth=wppaColWidth||[],wppaMCRWidth,wppaMCRWidth=wppaMCRWidth||[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,wppaThumbAspect=.75,wppaFilmonlyContinuous=!1,wppaNoAnimateOnMobile=!1,wppaAjaxScroll=!0,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=200,wppaArtmonkeyFileNotSource=!1,wppaRequestInfoDialogText="Please specify your question",wppaGlobalFsIconSize=32,wppaFsFillcolor="#999999",wppaFsBgcolor="transparent",_wppaId=[],_wppaRealId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],_wppaLastIdx=[],_wppaStopping=[],_wppaFilename=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlTypes,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlClosing=!1,wppaThumbSize=100,wppaTfMargin=4,wppaZoomData=[],wppaSphericData=[],wppaFsPolicy="lightbox",wppaOvlGlobal,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaIsIpad=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeEndTimer,wppaScrollEndTimer;function wppaTabbyClick(){jQuery(window).trigger("resize"),jQuery(document).trigger("tabbychange"),jQuery(window).trigger("orientationchange"),wppaAdjustAllFilmstrips()}function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){jQuery(".wppa-ubb").each(function(){var p=jQuery(this).attr("id").substr(6);wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")})},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",wppaMakeLazyVisible),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaInitMasonryPlus),jQuery(window).on("resize",wppaAdjustAllFilmstrips),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){setTimeout(function(){jQuery(".wppa-thumb-area").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery(".albumlist").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery(".wppa-div").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery("body").getNiceScroll&&jQuery("body").getNiceScroll().resize()},2e3)}),jQuery(window).trigger("resize"),wppaProtect(),setTimeout(function(){jQuery(".responsive-tabs__heading").on("click",wppaTabbyClick),jQuery(".responsive-tabs__list__item").on("click",wppaTabbyClick)},10),jQuery(document).on("tabbychange",function(){jQuery("div").getNiceScroll&&setTimeout(function(){jQuery("div").getNiceScroll().resize(),wppaDoAllAutocols()},500),setTimeout(function(){wppaDoAllAutocols(),jQuery(window).trigger("resize"),jQuery("#wppa-ovl-spin").hide(),wppaMakeLazyVisible()},1500)}),wppaOvlGlobal&&jQuery("a").each(function(){var p=jQuery(this).attr("href");p&&("jpg"!=(p=(p=p.split("."))[p.length-1])&&"jpeg"!=p&&"png"!=p||jQuery(this).attr("data-rel")||(jQuery(this).attr("data-rel",wppaOvlGlobal),jQuery(this).css("cursor","wait")))}),jQuery("div").on("touchmove",wppaMakeLazyVisible)}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)});var wppaLastAllAutocols=0,wppaLastAllAutocolsTimer=0;function wppaDoAllAutocols(p){wppaTimNow()<wppaLastAllAutocols+wppaExtendedResizeDelay?wppaLastAllAutocolsTimer=wppaLastAllAutocolsTimer||setTimeout(wppaDoAllAutocols,wppaExtendedResizeDelay):(clearTimeout(wppaLastAllAutocolsTimer),wppaLastAllAutocols=wppaTimNow(),_wppaDoAllAutocols(0))}function _wppaDoAllAutocols(e){return jQuery(".wppa-container").each(function(){var p=jQuery(this).attr("id").substr(15);wppaAutoColumnWidth[p]&&_wppaDoAutocol(p,e)}),(e<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(e+1)},wppaExtendedResizeDelay),!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}),jQuery("canvas").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p);if(e){var a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t,o=wppaGetContainerWidth(p);if(document.getElementById("wppa-container-"+p)){if(wppaCoverImageResponsive[p]||1<(a=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(a[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:o-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:o})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:o},wppaResponseSpeed))),1<(a=jQuery(".wppa-cover-box-mcr-"+p)).length){var r=document.getElementById("wppa-albumlist-"+p).clientWidth,i=parseInt((r+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,n=i-1,s=parseInt((r+wppaCoverSpacing)/i-wppaCoverSpacing);if(wppaColWidth[p]!=r||wppaMCRWidth[p]!=s){wppaColWidth[p]=r,wppaMCRWidth[p]=s;for(var l=0;l<a.length;){switch(l%i){case 0:jQuery(a[l]).css({marginLeft:"0px",clear:"both",float:"left"});break;case n:jQuery(a[l]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(a[l]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}l++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(a[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:s},wppaResponseSpeed)}}else 1==a.length&&(wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})));0<jQuery(".wppa-album-cover-grid-"+p).length&&(jQuery("#wppa-container-"+p).css("line-height","0"),(t=parseInt(o/wppaMaxCoverWidth+.9999))<1&&(t=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/t+"%"})),!wppaThumbSpaceAuto||(r=parseInt(jQuery(".thumbnail-frame-"+p).css("width")))&&(s=o-wppaThumbnailAreaDelta-7,t=Math.max(1,parseInt(s/(r+wppaMinThumbSpace))),t=parseInt((s-t*r)/(t+1)),jQuery(".thumbnail-frame-"+p).css({marginLeft:t})),jQuery(".thumbnail-frame-comalt-"+p).css("width",o-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",o-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var w,u=1,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");c;)w=c*(o-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+u+"-"+p).css("height",w),u++,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",o-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*o),wppaFilmStripLength[p]=o-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",o),jQuery(".wppa-simg-"+p).css("width",o-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",o+10),jQuery(".wppa-mimg-"+p).css("width",o),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(o/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*o),wppaSetRealCalendarHeights(p),!0}}function wppaSetRealCalendarHeights(e){var a,t,o,p=jQuery("#wppa-real-calendar-"+e).width();0<p&&(a=!0,t=p*wppaThumbAspect/7,jQuery(".wppa-real-calendar-day-"+e).css({height:t}),p=p/50+2,jQuery("#wppa-real-calendar-"+e).css({fontSize:p}),p=p/4,jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:p,marginBottom:p}),o=t/2,jQuery(".wppa-realcalimg-"+e).each(function(){var p;0==this.height?a=!1:(p=jQuery(this).attr("data-day"),thisb=o-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb}))}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100))}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);o=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:o})}}}function wppaGetChildI(p){for(var e=p.childNodes,a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;t=wppaGetChildI(t);if(t)return t}return!1}jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace(/&quot;/g,'"').replace('"]','">').replace("[/a]","</a>").replace("[img","<img").replace("/]","/>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+e).html(p.state.html);break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e&&(a=document.location.href.split("&wppa-occur="),e=parseInt(a[1]));var a=document.location.href.split("&wppa-photo="),t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy||("undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,e){var a,t;document.selection?(p.focus(),sel=document.selection.createRange(),sel.text=e):p.selectionStart||"0"==p.selectionStart?(a=p.selectionStart,t=p.selectionEnd,p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length):p.value+=e}function wppaGeoInit(p,e,a){var e=new google.maps.LatLng(e,a),a={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:e},t=new google.maps.Map(document.getElementById("map-canvas-"+p),a),o=new google.maps.Marker({position:e,map:t,title:""});google.maps.event.addListener(t,"center_changed",function(){window.setTimeout(function(){t.panTo(o.getPosition())},1e3)})}function wppaEncode(p){if(void 0!==p){for(var e=(t=(t=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,t="";a<e.length;)t+=e[a],++a<e.length&&(t+="||PLUS||");return t}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var a=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(a){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var i=jQuery(".wppa-ss-albumcat-"+p),r="";for(n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");i=jQuery(".wppa-ss-albumtext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");i=jQuery(".wppa-ss-phototag-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var n,i=jQuery(".wppa-ss-phototext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}e&&(-1==(e=jQuery("#wppa-ss-pageurl-"+p).val()).indexOf("?")?e+="?":e+="&",e+="occur=1&wppa-supersearch="+a+","+t+","+o+","+r,document.location.href=e)}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,e){p=jQuery(p).length;6<p&&(p=6),p<2&&(p=2),jQuery(e).attr("size",p)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).prop("disabled",!0),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,e,a,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}function wppaInitMasonryPlus(){jQuery(".grid-masonryplus").each(function(){var p=jQuery(this).attr("id").substr(5),e=wppaGetContainerWidth(p)-wppaThumbnailAreaDelta,e=e/parseInt((e+wppaTfMargin)/(.75*wppaThumbSize+wppaTfMargin))-wppaTfMargin;jQuery(".grid-item").css("visibility","visible"),jQuery(".grid-item-"+p).css("width",e+"px"),jQuery("#grid-"+p).masonry({itemSelector:".grid-item-"+p,columnWidth:e,gutter:wppaTfMargin,fitWidth:!0})})}function wppaFsChange(){wppaFsShow(),wppaOvlShowSame()}function wppaGlobalFS(){if(wppaIsIpad)return!1;if(wppaIsSafari)return!1;var p=parseInt(wppaGlobalFsIconSize/4),e=p;!wppaIsMobile&&0<jQuery("#wpadminbar").length&&(p+=jQuery("#wpadminbar").height()),jQuery("body").append('<div id="wppa-fulls-btn-1" class="wppa-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'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:'+p+"px;right:"+e+'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 p=document.documentElement;p.requestFullscreen?p.requestFullscreen():p.mozRequestFullScreen?p.mozRequestFullScreen():p.webkitRequestFullScreen&&p.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())}jQuery(document).ready(function(){"global"==wppaFsPolicy&&wppaGlobalFS(),jQuery(window).on("DOMContentLoaded load",wppaFsShow),jQuery(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange",wppaFsChange)});
5
  // wppa-slideshow
1
  // wppa-utils
2
+ var wppaDebug;wppaJsUtilsVersion="8.0.00.005";var wppaMakeLazyVisibleScrollEndTimer,wppaDebugCounter=0;function wppaAnimate(e,t,a,p,i){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css(t),i&&setTimeout(i,10)):jQuery(e).stop().animate(t,a,p,i)}function wppaFadeIn(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:""}),a&&setTimeout(a,10)):jQuery(e).stop().fadeIn(t,a)}function wppaFadeOut(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"none"}),a&&setTimeout(a,10)):jQuery(e).stop().fadeOut(t,a)}function wppaFadeTo(e,t,a,p){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"",opacity:a}),p&&setTimeout(p,10)):jQuery(e).stop().fadeTo(t,a,p)}function wppaTrim(e,t){e=wppaTrimLeft(e,t);return e=wppaTrimRight(e,t)}function wppaTrimLeft(e,t){var a,p,i,n,r,o,s;switch(typeof t){case"string":for(p=(a=e).length,i=t.length;i<=p&&a.substr(0,i)==t;)p=(a=a.substr(i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<t.length;)s=wppaTrimLeft(s,t[n]),n++;r=o==s}a=s;break;default:return e.replace(/^\s\s*/,"")}return a}function wppaTrimRight(e,t){var a,p,i,n,r,o,s;switch(typeof t){case"string":for(p=(a=e).length,i=t.length;i<=p&&a.substr(p-i)==t;)p=(a=a.substr(0,p-i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<t.length;)s=wppaTrimRight(s,t[n]),n++;r=o==s}a=s;break;default:return e.replace(/\s\s*$/,"")}return a}function wppa_setCookie(e,t,a){var p=new Date;p.setDate(p.getDate()+a);p=escape(t)+(null==a?"":"; expires="+p.toUTCString());document.cookie=e+"="+p}function wppa_getCookie(e){for(var t,a,p=document.cookie.split(";"),i=0;i<p.length;i++)if(t=p[i].substr(0,p[i].indexOf("=")),a=p[i].substr(p[i].indexOf("=")+1),(t=t.replace(/^\s+|\s+$/g,""))==e)return unescape(a);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,t){var a,p,i;"undefined"==typeof console||!wppaDebug&&"force"!=t||(a=(new Date).getTime()%864e5,a-=60*(p=Math.floor(a/36e5))*60*1e3,a-=60*(i=Math.floor(a/6e4))*1e3,t=Math.floor(a/1e3),console.log("At: "+p+":"+i+":"+t+"."+(a-=1e3*t)+" message: "+e))}function wppaSvgHtml(e,t,a,p,i,n,r,o){var s;switch(i=i||"0",n=n||"10",r=r||"20",o=o||"50",wppaSvgCornerStyle){case"gif":case"none":radius=i;break;case"light":radius=n;break;case"medium":radius=r;break;case"heavy":radius=o}t=t||"32px",a="Full-Screen"==e||"Exit-Full-Screen"==e?(s=wppaFsFillcolor,wppaFsBgcolor):a?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor),""==s&&(s="transparent"),""==a&&(a="transparent");var l='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="'+(t?"height:"+t+";":"")+"fill:"+s+";background-color:"+a+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":l+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":l+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":l+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":l+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":l+='<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":l+='<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":l+='<path d="M30,0H0V30H30V0z M9 4 L15 10 L21 4 L26 9 L20 15 L26 21 L21 26 L15 20 L9 26 L4 21 L10 15 L4 9Z" />';break;case"Full-Screen":l+='<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":l+='<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":l+='<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":l+='<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:l+='<path d="M30,0H0V30H30V0z" />'}return l+="</g></svg>"}function wppaMakeLazyVisibleScrollEnd(){clearTimeout(wppaMakeLazyVisibleScrollEndTimer),wppaMakeLazyVisibleScrollEndTimer=setTimeout(wppaMakeLazyVisible,wppaScrollEndDelay)}var wppaLastLazy=0,wppaLazyTimer=0,wppaLazyBusy=!1;function wppaMakeLazyVisible(){if(!wppaLazyBusy&&(wppaLazyBusy=!0,wppaInitMasonryPlus(),wppaLazyLoad)){var e,t=new Date,a=t.getTime();if(a<wppaLastLazy+250)return clearTimeout(wppaLazyTimer),wppaLazyTimer=setTimeout(function(){wppaMakeLazyVisible()},100),void(wppaLazyBusy=!1);wppaLastLazy=a,clearTimeout(wppaLazyTimer);var p=0;jQuery("*[data-src]").each(function(){e=jQuery(this).attr("data-src"),(wppaIsElementInViewport(this)||wppaIsMobile)&&(jQuery(this).attr("src",e),jQuery(this).removeAttr("data-src"),p++)}),0<p&&(wppaInitMasonryPlus(),jQuery("div").getNiceScroll&&setTimeout(function(){jQuery("div").getNiceScroll().resize()},500),setTimeout(function(){jQuery(".wppa-box").trigger("scroll"),jQuery("body").trigger("scroll")},250)),a=(t=new Date).getTime(),wppaLastLazy=a,wppaLazyBusy=!1}}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 t=jQuery(e);t[0]&&"BODY"!=t[0].nodeName;){if("none"==jQuery(t[0]).css("display"))return!1;t=jQuery(t[0]).parent()}"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);e=e.getBoundingClientRect();return!e||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))}function wppaIconSize(e,t,a){a=a?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==a?t:(wppaIsMini[e]?a/2:a)+"px;"}function wppaEntityDecode(e){return e=(e=(e=(e=(e=e.split("&amp;").join("&")).split("&gt;").join(">")).split("&lt;").join("<")).split("&quot;").join('"')).split("&#39;").join("'")}function wppaSetMaxWidthToParentWidth(e){var t=e.parentNode.clientWidth;jQuery(e).css({maxWidth:t})}function wppaWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function wppaWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}function wppaAdjustControlbar(){var e,t,a=jQuery;wppaOvlOpen&&(t=wppaIsFs()?(a(".wppa-pctl-div-lb").css({position:"fixed",left:0,right:0,bottom:0}),screen.width):(a(".wppa-pctl-div-lb").css({position:"initial"}),a("#wppa-ovl-pan-container").width()),wppaIsMobile&&wppaIsFs()&&(t-=20),t<12*(parseInt(wppaOvlIconSize)+4)?0<(e=parseInt(t/12-4))&&(a(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),a(".wppa-pctl-div-lb").find("span").css({height:e,width:e})):(e=wppaOvlIconSize,a(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),a(".wppa-pctl-div-lb").find("span").css({height:e,width:e})),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()?a(".wppa-pctl-div-lb").css({paddingLeft:10,paddingRight:10}):a(".wppa-pctl-div-lb").css({paddingLeft:0,paddingRight:0}),a(".wppa-pctl-div-lb").css({visibility:"visible"}))}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,t,a){},error:function(e,t,a){wppaConsoleLog("wppaServerLog failed. Error = "+a+", status = "+t,"force")}})}function wppaTimNow(){return(new Date).getTime()}
3
  // wppa
4
  wppaWppaVer="8.0.00.001";var wppaIsChrome=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime),wppaIsSafari=!1,wppaOvlActivePanorama=0,wppaSlideShow,wppaPhoto,wppaOf,wppaNextPhoto,wppaPreviousPhoto,wppaNextP,wppaPrevP,wppaAvgRating,wppaMyRating,wppaAvgRat,wppaMyRat,wppaDislikeMsg,wppaStart,wppaStop,wppaPleaseName,wppaPleaseEmail,wppaPleaseComment,wppaProcessing,wppaDone,wppaUploadFailed,wppaServerError,wppaVersion="0",wppaIsIe=!1,wppaDebug,wppaFullValign=[],wppaFullHalign=[],wppaFullFrameDelta=[],wppaAnimationSpeed,wppaImageDirectory,wppaAutoColumnWidth,wppaAutoColumnWidth=wppaAutoColumnWidth||[],wppaAutoColumnFrac,wppaAutoColumnFrac=wppaAutoColumnFrac||[],wppaThumbnailAreaDelta,wppaSlideShowTimeOut=2500,wppaFadeInAfterFadeOut=!1,wppaTextFrameDelta=0,wppaBoxDelta=0,wppaPreambule=[],wppaHideWhenEmpty=!1,wppaThumbnailPitch=[],wppaFilmStripLength=[],wppaFilmStripMargin=[],wppaFilmStripAreaDelta=[],wppaFilmShowGlue=!1,wppaIsMini=[],wppaPortraitOnly=[],wppaMiniTreshold=300,wppaRatingOnce=!0,wppaBGcolorNumbar="transparent",wppaBcolorNumbar="transparent",wppaBGcolorNumbarActive="transparent",wppaBcolorNumbarActive="transparent",wppaFontFamilyNumbar="",wppaFontSizeNumbar="",wppaFontColorNumbar="",wppaFontWeightNumbar="",wppaFontFamilyNumbarActive="",wppaFontSizeNumbarActive="",wppaFontColorNumbarActive="",wppaFontWeightNumbarActive="",wppaNumbarMax="10",wppaAjaxUrl="",wppaLang="",wppaNextOnCallback=!1,wppaStarOpacity=.2,wppaLightBox=[],wppaEmailRequired="required",wppaSlideBorderWidth=0,wppaSlideInitRunning=[],wppaAnimationType="fadeover",wppaSlidePause=[],wppaSlideBlank=[],wppaRatingMax=5,wppaRatingDisplayType="graphic",wppaRatingPrec=2,wppaFilmPageSize=[],wppaAspectRatio=[],wppaFullSize=[],wppaStretch=!1,wppaThumbSpaceAuto=!1,wppaMinThumbSpace=4,wppaMagnifierCursor="",wppaArtMonkyLink="none",wppaAutoOpenComments=!1,wppaUpdateAddressLine=!1,wppaFilmThumbTitle="",wppaClickToView="",wppaUploadUrl="",wppaVoteForMe="",wppaVotedForMe="",wppaSlideSwipe=!0,wppaLightboxSingle=[],wppaMaxCoverWidth=300,wppaDownLoad="Download",wppaSiteUrl="",wppaWppaUrl="",wppaIncludeUrl="",wppaSlideToFullpopup=!1,wppaComAltSize=75,wppaBumpViewCount=!0,wppaBumpClickCount=!1,wppaFotomoto=!1,wppaArtMonkeyButton=!0,wppaShortQargs=!1,wppaOvlHires=!1,wppaMasonryCols=[],wppaVideoPlaying=[],wppaAudioPlaying=[],wppaSlideVideoStart=!1,wppaSlideAudioStart=!1,wppaAudioHeight=28,wppaHis=0,wppaStartHtml=[],wppaCanAjaxRender=!1,wppaCanPushState=!1,wppaAllowAjax=!0,wppaMaxOccur=0,wppaFirstOccur=0,wppaUsePhotoNamesInUrls=!1,wppaShareHideWhenRunning=!1,wppaCommentRequiredAfterVote=!0,wppaTopMoc=0,wppaColWidth,wppaColWidth=wppaColWidth||[],wppaMCRWidth,wppaMCRWidth=wppaMCRWidth||[],wppaFotomotoHideWhenRunning=!1,wppaFotomotoMinWidth=400,wppaPhotoView=[],wppaBackgroundColorImage="",wppaPopupLinkType="",wppaPopupOnclick=[],wppaThumbTargetBlank=!1,wppaRel="rel",wppaEditPhotoWidth="960",wppaThemeStyles="",wppaStickyHeaderHeight=0,wppaRenderModal=!1,wppaModalBgColor="#ffffff",wppaBoxRadius=0,wppaModalQuitImg,wppaUploadEdit="none",wppaPageArg="",wppaSlideshowNavigationType="icons",wppaCoverImageResponsive=[],wppaSearchBoxSelItems=[],wppaSlideWrap=[],wppaHideRightClick=!1,wppaGeoZoom=10,wppaLazyLoad=!0,wppaAreaMaxFrac=1,wppaNiceScroll=!1,wppaIconSizeNormal="default",wppaIconSizeSlide=48,wppaIconSizeStars=24,wppaResponseSpeed=500,wppaExtendedResizeCount=0,wppaExtendedResizeDelay=200,wppaThumbAspect=.75,wppaFilmonlyContinuous=!1,wppaNoAnimateOnMobile=!1,wppaAjaxScroll=!0,wppaFilmInit=[],wppaResizeEndDelay=200,wppaScrollEndDelay=200,wppaArtmonkeyFileNotSource=!1,wppaRequestInfoDialogText="Please specify your question",wppaGlobalFsIconSize=32,wppaFsFillcolor="#999999",wppaFsBgcolor="transparent",_wppaId=[],_wppaRealId=[],_wppaAvg=[],_wppaDisc=[],_wppaMyr=[],_wppaVRU=[],_wppaLinkUrl=[],_wppaLinkTitle=[],_wppaLinkTarget=[],_wppaCommentHtml=[],_wppaIptcHtml=[],_wppaExifHtml=[],_wppaToTheSame=!1,_wppaSlides=[],_wppaNames=[],_wppaFullNames=[],_wppaDsc=[],_wppaOgDsc=[],_wppaCurIdx=[],_wppaNxtIdx=[],_wppaTimeOut=[],_wppaSSRuns=[],_wppaFg=[],_wppaTP=[],_wppaIsBusy=[],_wppaFirst=[],_wppaVoteInProgress=!1,_wppaTextDelay,_wppaUrl=[],_wppaSkipRated=[],_wppaLbTitle=[],_wppaStateCount=0,_wppaDidGoto=[],_wppaShareUrl=[],_wppaShareHtml=[],_wppaFilmNoMove=[],_wppaHiresUrl=[],_wppaIsVideo=[],_wppaVideoHtml=[],_wppaAudioHtml=[],_wppaVideoNatWidth=[],_wppaVideoNatHeight=[],_wppaWaitTexts=[],_wppaImageAlt=[],_wppaLastIdx=[],_wppaStopping=[],_wppaFilename=[],__wppaOverruleRun=!1,wppaOvlUrls,wppaOvlIds,wppaOvlTitles,wppaOvlAlts,wppaOvlTypes,wppaOvlIdx=0,wppaOvlFirst=!0,wppaOvlKbHandler="",wppaOvlSizeHandler="",wppaOvlPadTop=5,wppaOvlIsSingle,wppaOvlRunning=!1,wppaOvlVideoHtmls,wppaOvlAudioHtmls,wppaOvlPdfHtmls,wppaOvlVideoNaturalWidths,wppaOvlVideoNaturalHeights,wppaOvlVideoPlaying=!1,wppaOvlAudioPlaying=!1,wppaOvlShowLegenda=!0,wppaOvlShowStartStop=!0,wppaOvlRadius=0,wppaOvlBorderWidth=16,wppaOvlOpen=!1,wppaOvlClosing=!1,wppaThumbSize=100,wppaTfMargin=4,wppaZoomData=[],wppaSphericData=[],wppaFsPolicy="lightbox",wppaOvlGlobal,wppaOvlTxtHeight=36,wppaOvlOpacity=.8,wppaOvlOnclickType="none",wppaOvlTheme="black",wppaOvlAnimSpeed=300,wppaOvlSlideSpeed=3e3,wppaVer4WindowWidth=800,wppaVer4WindowHeight=600,wppaOvlFontFamily="Helvetica",wppaOvlFontSize="10",wppaOvlFontColor="",wppaOvlFontWeight="bold",wppaOvlLineHeight="12",wppaOvlShowCounter=!0,wppaOvlIsVideo=!1,wppaShowLegenda="",wppaOvlFsPhotoId=0,wppaPhotoId=0,wppaOvlVideoStart=!1,wppaOvlAudioStart=!1,wppaLastIptc="",wppaLastExif="",wppaIsMobile=!1,wppaIsIpad=!1,wppaSvgFillcolor="gray",wppaSvgBgcolor="transparent",wppaSvgCornerStyle="light",wppaCoverSpacing=8,wppaResizeEndTimer,wppaScrollEndTimer;function wppaTabbyClick(){jQuery(window).trigger("resize"),jQuery(document).trigger("tabbychange"),jQuery(window).trigger("orientationchange"),wppaAdjustAllFilmstrips()}function wppaDoInit(){_wppaTextDelay=wppaAnimationSpeed,wppaFadeInAfterFadeOut&&(_wppaTextDelay*=2),wppaIsMobile&&wppaNoAnimateOnMobile&&(_wppaTextDelay=10),jQuery(".wppa-ajax-spin").stop().fadeOut(),jQuery(".wppa-ovl-spin").hide(),setTimeout(function(){jQuery(".wppa-ubb").each(function(){var p=jQuery(this).attr("id").substr(6);wppaUbb(p,"l","hide"),wppaUbb(p,"r","hide")})},3e3),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaDoAllAutocols),jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeArea),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaMakeLazyVisible),jQuery(".wppa-divnicewrap").on("DOMContentLoaded load resize wppascrollend wheelend orientationchange",wppaMakeLazyVisible),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",wppaInitMasonryPlus),jQuery(window).on("resize",wppaAdjustAllFilmstrips),jQuery(window).on("DOMContentLoaded load resize wppascrollend orientationchange",function(){setTimeout(function(){jQuery(".wppa-thumb-area").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery(".albumlist").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery(".wppa-div").each(function(){jQuery(this).getNiceScroll&&jQuery(this).getNiceScroll().resize()}),jQuery("body").getNiceScroll&&jQuery("body").getNiceScroll().resize()},2e3)}),jQuery(window).trigger("resize"),wppaProtect(),setTimeout(function(){jQuery(".responsive-tabs__heading").on("click",wppaTabbyClick),jQuery(".responsive-tabs__list__item").on("click",wppaTabbyClick)},10),jQuery(document).on("tabbychange",function(){jQuery("div").getNiceScroll&&setTimeout(function(){jQuery("div").getNiceScroll().resize(),wppaDoAllAutocols()},500),setTimeout(function(){wppaDoAllAutocols(),jQuery(window).trigger("resize"),jQuery("#wppa-ovl-spin").hide(),wppaMakeLazyVisible()},1500)}),wppaOvlGlobal&&jQuery("a").each(function(){var p=jQuery(this).attr("href");p&&("jpg"!=(p=(p=p.split("."))[p.length-1])&&"jpeg"!=p&&"png"!=p||jQuery(this).attr("data-rel")||(jQuery(this).attr("data-rel",wppaOvlGlobal),jQuery(this).css("cursor","wait")))}),jQuery("div").on("touchmove",wppaMakeLazyVisible)}function wppaSizeAutoDiv(){jQuery(".wppa-autodiv").each(function(p){var e=jQuery(window).height(),a=jQuery(this).attr("data-max-height");jQuery(this).css({maxHeight:e*a})})}jQuery(document).ready(function(){wppaDoInit()}),jQuery(document).ready(function(){jQuery(window).on("resize load",function(){clearTimeout(wppaResizeEndTimer),wppaResizeEndTimer=setTimeout(function(){jQuery(window).trigger("wpparesizeend")},wppaResizeEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("scroll wheel touchmove",function(){clearTimeout(wppaScrollEndTimer),wppaScrollEndTimer=setTimeout(function(){jQuery(window).trigger("wppascrollend")},wppaScrollEndDelay)})}),jQuery(document).ready(function(){jQuery(window).on("DOMContentLoaded load resize scroll wheel orientationchange",wppaSizeAutoDiv)});var wppaLastAllAutocols=0,wppaLastAllAutocolsTimer=0;function wppaDoAllAutocols(p){wppaTimNow()<wppaLastAllAutocols+wppaExtendedResizeDelay?wppaLastAllAutocolsTimer=wppaLastAllAutocolsTimer||setTimeout(wppaDoAllAutocols,wppaExtendedResizeDelay):(clearTimeout(wppaLastAllAutocolsTimer),wppaLastAllAutocols=wppaTimNow(),_wppaDoAllAutocols(0))}function _wppaDoAllAutocols(e){return jQuery(".wppa-container").each(function(){var p=jQuery(this).attr("id").substr(15);wppaAutoColumnWidth[p]&&_wppaDoAutocol(p,e)}),(e<wppaExtendedResizeCount||-1==wppaExtendedResizeCount)&&setTimeout(function(){_wppaDoAllAutocols(e+1)},wppaExtendedResizeDelay),!0}function wppaProtect(){wppaHideRightClick&&(jQuery("img").bind("contextmenu",function(p){return!1}),jQuery("video").bind("contextmenu",function(p){return!1}),jQuery("canvas").bind("contextmenu",function(p){return!1}))}function wppaUpdateLightboxes(){"function"==typeof wppaInitOverlay&&wppaInitOverlay(),"undefined"!=typeof myLightbox&&"function"==typeof myLightbox.updateImageList&&myLightbox.updateImageList(),jQuery().prettyPhoto&&jQuery("a[rel^='prettyPhoto']").prettyPhoto({deeplinking:!1})}function wppaStopVideo(p){var e,a,t=[];for(t[1]="wppa-overlay-img",t[2]="theimg0-"+p,t[3]="theimg1-"+p,a=0;a<3;)1==++a&&0!=p||(e=document.getElementById(t[a]))&&"function"==typeof e.pause&&e.pause()}function wppaStopAudio(p){if("number"==typeof p)jQuery("#audio-"+p).pause&&jQuery("#audio-"+p).pause();else{var e=jQuery("audio");if(0<e.length)for(var a=0;a<e.length;)"wppa"==jQuery(e[a]).attr("data-from")&&e[a].pause(),a++}}function wppaMakeFullsizeUrl(p){var e,a;p=(e=(p=p.replace("/thumbs/","/")).split("//"))[1]?(a=e[1].split("/"),e[0]+"//"):(a=e[0].split("/"),"");for(var t=0;t<a.length;){var o=a[t];"w"!=o.split("_")[0]&&(0!=t&&(p+="/"),p+=o),t++}return p}function wppaGetContainerWidth(p){var e=document.getElementById("wppa-container-"+p);if(e){var a=0;if(!wppaAutoColumnWidth[p])return e.clientWidth;for(;0==a;)e=e.parentNode,a=jQuery(e).width();return parseInt(a*wppaAutoColumnFrac[p])}}function _wppaDoAutocol(p,e){if(!wppaAutoColumnWidth[p])return!0;var a,t,o=wppaGetContainerWidth(p);if(document.getElementById("wppa-container-"+p)){if(wppaCoverImageResponsive[p]||1<(a=jQuery(".wppa-asym-text-frame-"+p)).length&&(jQuery(a[0]).width(),0==wppaResponseSpeed?(jQuery(".wppa-asym-text-frame-"+p).css({width:o-wppaTextFrameDelta}),jQuery(".wppa-cover-box-"+p).css({width:o})):(jQuery(".wppa-asym-text-frame-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-"+p).stop().animate({width:o},wppaResponseSpeed))),1<(a=jQuery(".wppa-cover-box-mcr-"+p)).length){var r=document.getElementById("wppa-albumlist-"+p).clientWidth,i=parseInt((r+wppaCoverSpacing)/(wppaMaxCoverWidth+wppaCoverSpacing))+1,n=i-1,s=parseInt((r+wppaCoverSpacing)/i-wppaCoverSpacing);if(wppaColWidth[p]!=r||wppaMCRWidth[p]!=s){wppaColWidth[p]=r,wppaMCRWidth[p]=s;for(var l=0;l<a.length;){switch(l%i){case 0:jQuery(a[l]).css({marginLeft:"0px",clear:"both",float:"left"});break;case n:jQuery(a[l]).css({marginLeft:"0px",clear:"none",float:"right"});break;default:jQuery(a[l]).css({marginLeft:wppaCoverSpacing,clear:"none",float:"left"})}l++}wppaCoverImageResponsive[p]||jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:s-wppaTextFrameDelta},wppaResponseSpeed),jQuery(a[0]).width(),jQuery(".wppa-cover-box-mcr-"+p).stop().animate({width:s},wppaResponseSpeed)}}else 1==a.length&&(wppaCoverImageResponsive[p]||(jQuery(".wppa-asym-text-frame-mcr-"+p).stop().animate({width:o-wppaTextFrameDelta},wppaResponseSpeed),jQuery(".wppa-cover-box-mcr-"+p).css({marginLeft:"0px",float:"left"})));0<jQuery(".wppa-album-cover-grid-"+p).length&&(jQuery("#wppa-container-"+p).css("line-height","0"),(t=parseInt(o/wppaMaxCoverWidth+.9999))<1&&(t=1),jQuery(".wppa-album-cover-grid-"+p).css({width:100/t+"%"})),!wppaThumbSpaceAuto||(r=parseInt(jQuery(".thumbnail-frame-"+p).css("width")))&&(s=o-wppaThumbnailAreaDelta-7,t=Math.max(1,parseInt(s/(r+wppaMinThumbSpace))),t=parseInt((s-t*r)/(t+1)),jQuery(".thumbnail-frame-"+p).css({marginLeft:t})),jQuery(".thumbnail-frame-comalt-"+p).css("width",o-wppaThumbnailAreaDelta),jQuery(".wppa-com-alt-"+p).css("width",o-wppaThumbnailAreaDelta-wppaComAltSize-16);for(var w,u=1,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");c;)w=c*(o-wppaThumbnailAreaDelta)/100,jQuery("#wppa-mas-h-"+u+"-"+p).css("height",w),u++,c=jQuery("#wppa-mas-h-"+u+"-"+p).attr("data-height-perc");return wppaSetMasHorFrameWidthsForIeAndChrome(p),document.getElementById("slide_frame-"+p)&&wppaFormatSlide(p),jQuery("#audio-slide-"+p).css("width",o-wppaBoxDelta-6),jQuery(".wppa-comment-textarea-"+p).css("width",.7*o),wppaFilmStripLength[p]=o-wppaFilmStripAreaDelta[p],jQuery("#filmwindow-"+p).css("width",wppaFilmStripLength[p]),_wppaAdjustFilmstrip(p),wppaIsMini[p]||void 0===_wppaSlides[p]||(wppaColWidth[p]<wppaMiniTreshold?(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRat),jQuery("#wppa-my-rat-"+p).html(wppaMyRat),jQuery("#counter-"+p).html(_wppaCurIdx[p]+1+" / "+_wppaSlides[p].length)):(jQuery("#wppa-avg-rat-"+p).html(wppaAvgRating),jQuery("#wppa-my-rat-"+p).html(wppaMyRating),jQuery("#counter-"+p).html(wppaPhoto+" "+(_wppaCurIdx[p]+1)+" "+wppaOf+" "+_wppaSlides[p].length))),jQuery(".wppa-sphoto-"+p).css("width",o),jQuery(".wppa-simg-"+p).css("width",o-2*wppaSlideBorderWidth),jQuery(".wppa-simg-"+p).css("height",""),jQuery(".wppa-mphoto-"+p).css("width",o+10),jQuery(".wppa-mimg-"+p).css("width",o),jQuery(".wppa-mimg-"+p).css("height",""),jQuery(".smxpdf-"+p).css("height",.8*wppaWindowHeight()),0<wppaSearchBoxSelItems[p]&&(o/wppaSearchBoxSelItems[p]<125?jQuery(".wppa-searchsel-item-"+p).css("width","100%"):jQuery(".wppa-searchsel-item-"+p).css("width",100/wppaSearchBoxSelItems[p]+"%")),jQuery(".wppa-upload-album-"+p).css("maxWidth",.6*o),wppaSetRealCalendarHeights(p),!0}}function wppaSetRealCalendarHeights(e){var a,t,o,p=jQuery("#wppa-real-calendar-"+e).width();0<p&&(a=!0,t=p*wppaThumbAspect/7,jQuery(".wppa-real-calendar-day-"+e).css({height:t}),p=p/50+2,jQuery("#wppa-real-calendar-"+e).css({fontSize:p}),p=p/4,jQuery(".wppa-real-calendar-head-td-"+e).css({marginTop:p,marginBottom:p}),o=t/2,jQuery(".wppa-realcalimg-"+e).each(function(){var p;0==this.height?a=!1:(p=jQuery(this).attr("data-day"),thisb=o-(t-this.height)/2,jQuery(".wppa-real-calendar-day-content-"+p+"-"+e).css({bottom:thisb}))}),a||setTimeout(function(){wppaSetRealCalendarHeights(e)},100))}function wppaSetMasHorFrameWidthsForIeAndChrome(p){for(var e=jQuery(".wppa-mas-h-"+p),a=wppaMinThumbSpace,t=0;t<e.length;t++){var o=wppaGetChildI(e[t]);if(o){if("IMG"==o.nodeName&&!o.complete)return void setTimeout("wppaSetMasHorFrameWidthsForIeAndChrome( "+p+" )",400);o=o.naturalWidth/o.naturalHeight*o.height+a;jQuery(e[t]).css({width:o})}}}function wppaGetChildI(p){for(var e=p.childNodes,a=0;a<e.length;a++){var t=e[a];if(t.id&&"i-"==t.id.substr(0,2))return t;t=wppaGetChildI(t);if(t)return t}return!1}jQuery(document).ready(function(p){if(wppaAllowAjax&&jQuery.ajax&&(wppaCanAjaxRender=!0),void 0!==history.pushState){for(var e=1;e<=wppaMaxOccur;)wppaStartHtml[e]=jQuery("#wppa-container-"+e).html(),e++;wppaCanPushState=!0}});var wppaFotomotoLoaded=!1,wppaFotomotoToolbarIds=[];function fotomoto_loaded(){wppaFotomotoLoaded=!0}function wppaFotomotoToolbar(p,e){if(!(wppaColWidth[p]>=wppaFotomotoMinWidth))return jQuery("#wppa-fotomoto-container-"+p).css("display","none"),void jQuery("#wppa-fotomoto-checkout-"+p).css("display","none");jQuery("#wppa-fotomoto-container-"+p).css("display","inline"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","inline"),wppaFotomoto&&document.getElementById("wppa-fotomoto-container-"+p)&&(wppaFotomotoLoaded?(FOTOMOTO.API.checkinImage(e),wppaFotomotoToolbarIds[p]=FOTOMOTO.API.showToolbar("wppa-fotomoto-container-"+p,e)):setTimeout("wppaFotomotoToolbar( "+p+',"'+e+'" )',200))}function wppaFotomotoHide(p){jQuery("#wppa-fotomoto-container-"+p).css("display","none"),jQuery("#wppa-fotomoto-checkout-"+p).css("display","none")}function wppaStringContainsForbiddenChars(p){for(var e=["?","&","#","/",'"',"'"],a=0;a<e.length;){if(-1!=p.indexOf(e[a]))return!0;a++}return!1}function wppaPushStateSlide(p,e,a){if(!wppaIsMini[p]&&wppaCanPushState&&wppaUpdateAddressLine&&""!=a)try{history.pushState({page:wppaHis,occur:p,type:"slide",slide:e},"---",a)}catch(p){wppaConsoleLog("Slide history stack update failed")}}function wppaRepairScriptTags(p){if(void 0===p)return"";for(;-1!=p.indexOf("[script");)p=p.replace("[script","<script");for(;-1!=p.indexOf("[/script");)p=p.replace("[/script","</script");return p}function wppaRepairBrTags(p){return void 0===p?"":p.replace("[br /]","<br />").replace("[a","<a").replace(/&quot;/g,'"').replace('"]','">').replace("[/a]","</a>").replace("[img","<img").replace("/]","/>")}function wppaTrimAlt(p){return void 0===p?"":13<p.length?p.substr(0,10)+"...":p}window.onpopstate=function(p){var e=0;if(wppaCanPushState){if(p.state)switch(e=p.state.occur,p.state.type){case"html":jQuery("#wppa-container-"+e).html(p.state.html);break;case"slide":_wppaGoto(e,p.state.slide)}else if(wppaUpdateAddressLine){e=wppaFirstOccur,jQuery("#wppa-container-"+e).html(wppaStartHtml[e]),(wppaFirstOccur=0)==e&&(a=document.location.href.split("&wppa-occur="),e=parseInt(a[1]));var a=document.location.href.split("&wppa-photo="),t=parseInt(a[1]);if(0<t){for(var o=0;o<_wppaId[e].length&&_wppaId[e][o]!=t;)o++;o<_wppaId[e].length&&_wppaGoto(e,o)}}document.getElementById("theslide0-"+e)&&_wppaStop(e)}"undefined"!=typeof wppaQRUpdate&&wppaQRUpdate(document.location.href)};var wppaFbInitBusy=!1;function wppaFbInit(){wppaFbInitBusy||("undefined"!=typeof FB?(wppaFbInitBusy=!0,setTimeout("_wppaFbInit()",10)):setTimeout("wppaFbInit()",200))}function _wppaFbInit(){FB.init({status:!0,xfbml:!0}),wppaFbInitBusy=!1}function wppaInsertAtCursor(p,e){var a,t;document.selection?(p.focus(),sel=document.selection.createRange(),sel.text=e):p.selectionStart||"0"==p.selectionStart?(a=p.selectionStart,t=p.selectionEnd,p.value=p.value.substring(0,a)+e+p.value.substring(t,p.value.length),p.selectionStart=a+e.length,p.selectionEnd=a+e.length):p.value+=e}function wppaGeoInit(p,e,a){var e=new google.maps.LatLng(e,a),a={disableDefaultUI:!1,panControl:!1,zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,overviewMapControl:!0,zoom:wppaGeoZoom,center:e},t=new google.maps.Map(document.getElementById("map-canvas-"+p),a),o=new google.maps.Marker({position:e,map:t,title:""});google.maps.event.addListener(t,"center_changed",function(){window.setTimeout(function(){t.panTo(o.getPosition())},1e3)})}function wppaEncode(p){if(void 0!==p){for(var e=(t=(t=String(p).replace(/#/g,"||HASH||")).replace(/&/g,"||AMP||")).split("+"),a=0,t="";a<e.length;)t+=e[a],++a<e.length&&(t+="||PLUS||");return t}}function wppaUrlToId(p){var e=p.split("/wppa/");return 1==e.length&&(e=p.split("/upload/")),1==e.length?0:e=(e=(e=(e=(e=(e=(e=e[1]).split("."))[0].replace("/","")).replace("/","")).replace("/","")).replace("/","")).replace("/","")}function wppaSuperSearchSelect(p,e){jQuery("#wppa-ss-albumopt-"+p).css("display","none"),jQuery("#wppa-ss-albumcat-"+p).css("display","none"),jQuery("#wppa-ss-albumname-"+p).css("display","none"),jQuery("#wppa-ss-albumtext-"+p).css("display","none"),jQuery("#wppa-ss-photoopt-"+p).css("display","none"),jQuery("#wppa-ss-photoname-"+p).css("display","none"),jQuery("#wppa-ss-photoowner-"+p).css("display","none"),jQuery("#wppa-ss-phototag-"+p).css("display","none"),jQuery("#wppa-ss-phototext-"+p).css("display","none"),jQuery("#wppa-ss-photoexif-"+p).css("display","none"),jQuery("#wppa-ss-photoiptc-"+p).css("display","none"),jQuery("#wppa-ss-exifopts-"+p).css("display","none"),jQuery("#wppa-ss-iptcopts-"+p).css("display","none"),jQuery("#wppa-ss-spinner-"+p).css("display","none"),jQuery("#wppa-ss-button-"+p).css("display","none");var a=jQuery("#wppa-ss-pa-"+p).val(),t="",o="",r="";switch(a){case"a":switch(jQuery("#wppa-ss-albumopt-"+p).css("display",""),t=jQuery("#wppa-ss-albumopt-"+p).val()){case"c":jQuery("#wppa-ss-albumcat-"+p).css("display","");var i=jQuery(".wppa-ss-albumcat-"+p),r="";for(n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"n":jQuery("#wppa-ss-albumname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-albumname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-albumtext-"+p).css("display","");i=jQuery(".wppa-ss-albumtext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","")}break;case"p":switch(jQuery("#wppa-ss-photoopt-"+p).css("display",""),t=jQuery("#wppa-ss-photoopt-"+p).val()){case"n":jQuery("#wppa-ss-photoname-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoname-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"o":jQuery("#wppa-ss-photoowner-"+p).css("display",""),null!=(r=jQuery("#wppa-ss-photoowner-"+p).val())&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"g":jQuery("#wppa-ss-phototag-"+p).css("display","");i=jQuery(".wppa-ss-phototag-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"t":jQuery("#wppa-ss-phototext-"+p).css("display","");var n,i=jQuery(".wppa-ss-phototext-"+p);for(r="",n=0;n<i.length;n++)jQuery(i[n]).prop("selected")&&(r+="."+jQuery(i[n]).val());""!=(r=r.substr(1))&&jQuery("#wppa-ss-button-"+p).css("display","");break;case"i":jQuery("#wppa-ss-photoiptc-"+p).css("display",""),(o=jQuery("#wppa-ss-photoiptc-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-iptcopts-"+p).css("display",""),wppaLastIptc!=o?(wppaAjaxGetSsIptcList(p,o,"wppa-ss-iptcopts-"+p),wppaLastIptc=o):null!=(r=jQuery("#wppa-ss-iptcopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")));break;case"e":jQuery("#wppa-ss-photoexif-"+p).css("display",""),(o=jQuery("#wppa-ss-photoexif-"+p).val())&&(2<o.length&&(o=o.replace("#","H")),""!=o&&(jQuery("#wppa-ss-exifopts-"+p).css("display",""),wppaLastExif!=o?(wppaAjaxGetSsExifList(p,o,"wppa-ss-exifopts-"+p),wppaLastExif=o):null!=(r=jQuery("#wppa-ss-exifopts-"+p).val())&&""!=r&&jQuery("#wppa-ss-button-"+p).css("display","")))}}e&&(-1==(e=jQuery("#wppa-ss-pageurl-"+p).val()).indexOf("?")?e+="?":e+="&",e+="occur=1&wppa-supersearch="+a+","+t+","+o+","+r,document.location.href=e)}function wppaAjaxGetSsIptcList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssiptclist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-iptcopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-iptclist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsIptcList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaAjaxGetSsExifList(t,p,o){jQuery.ajax({url:wppaAjaxUrl,data:"action=wppa&wppa-action=getssexiflist&tag="+p+"&moccur="+t,async:!0,type:"GET",timeout:1e4,beforeSend:function(p){jQuery("#wppa-ss-spinner-"+t).css("display","")},success:function(p,e,a){jQuery("#"+o).html(p),jQuery("#wppa-ss-exifopts-"+t).css("display",""),wppaSuperSearchSelect(t),setTimeout('wppaSetIptcExifSize( ".wppa-exiflist-'+t+'", "#'+o+'" )',10)},error:function(p,e,a){wppaConsoleLog("wppaAjaxGetSsExifList failed. Error = "+a+", status = "+e,"force")},complete:function(p,e,a){jQuery("#wppa-ss-spinner-"+t).css("display","none")}})}function wppaSetIptcExifSize(p,e){p=jQuery(p).length;6<p&&(p=6),p<2&&(p=2),jQuery(e).attr("size",p)}function wppaUpdateSearchRoot(p,e){for(var a=jQuery(".wppa-search-root"),t=0;t<a.length;)jQuery(a[t]).html(p),t++;for(a=jQuery(".wppa-rootbox"),t=0;t<a.length;)e?(jQuery(a[t]).prop("checked",!1),jQuery(a[t]).prop("disabled",!1)):(jQuery(a[t]).prop("checked",!0),jQuery(a[t]).prop("disabled",!0)),t++;for(a=jQuery(".wppa-search-root-id"),t=0;t<a.length;)jQuery(a[t]).val(e),t++}function wppaSubboxChange(p){jQuery(p).prop("checked")&&jQuery(".wppa-rootbox").each(function(p){jQuery(this).prop("checked",!0)})}function wppaClearSubsearch(){for(var p=jQuery(".wppa-display-searchstring"),e=0;e<p.length;)jQuery(p[e]).html(""),e++;for(p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).prop("disabled",!0),e++}function wppaEnableSubsearch(){for(var p=jQuery(".wppa-search-sub-box"),e=0;e<p.length;)jQuery(p[e]).removeAttr("disabled"),e++}function wppaDisplaySelectedFiles(p){for(var e=jQuery("#"+p),a=0,t="";a<e[0].files.length;)t+=e[0].files[a].name+" ",a++;jQuery("#"+p+"-display").val(t)}function wppaIsEmpty(p){return null==p||(void 0===p||(""==p||(0==p||(0==p||void 0))))}function wppaGetUploadOptions(yalb,mocc,where,onComplete){var options={beforeSend:function(){jQuery("#progress-"+yalb+"-"+mocc).show(),jQuery("#bar-"+yalb+"-"+mocc).width("0%"),jQuery("#message-"+yalb+"-"+mocc).html(""),jQuery("#percent-"+yalb+"-"+mocc).html("")},uploadProgress:function(p,e,a,t){jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#7F7"),jQuery("#bar-"+yalb+"-"+mocc).width(t+"%"),t<95?jQuery("#percent-"+yalb+"-"+mocc).html(t+"%"):jQuery("#percent-"+yalb+"-"+mocc).html(wppaProcessing)},success:function(){jQuery("#bar-"+yalb+"-"+mocc).width("100%"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaDone),jQuery(".wppa-upload-button").val(wppaUploadButtonText)},complete:function(response){-1!=response.responseText.indexOf(wppaUploadFailed)?(jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed),jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>")):(jQuery("#message-"+yalb+"-"+mocc).html('<span style="font-size: 10px;" >'+response.responseText+"</span>"),"thumb"!=where&&"cover"!=where||eval(onComplete))},error:function(){jQuery("#message-"+yalb+"-"+mocc).html('<span style="color: red;" >'+wppaServerError+"</span>"),jQuery("#bar-"+yalb+"-"+mocc).css("backgroundColor","#F77"),jQuery("#percent-"+yalb+"-"+mocc).html(wppaUploadFailed)}};return options}function wppaInitMasonryPlus(){jQuery(".grid-masonryplus").each(function(){var p=jQuery(this).attr("id").substr(5),e=wppaGetContainerWidth(p)-wppaThumbnailAreaDelta,e=e/parseInt((e+wppaTfMargin)/(.75*wppaThumbSize+wppaTfMargin))-wppaTfMargin;jQuery(".grid-item").css("visibility","visible"),jQuery(".grid-item-"+p).css("width",e+"px"),jQuery("#grid-"+p).masonry({itemSelector:".grid-item-"+p,columnWidth:e,gutter:wppaTfMargin,fitWidth:!0})})}function wppaFsChange(){wppaFsShow(),wppaOvlShowSame()}function wppaGlobalFS(){if(wppaIsIpad)return!1;if(wppaIsSafari)return!1;var p=parseInt(wppaGlobalFsIconSize/4),e=p;!wppaIsMobile&&0<jQuery("#wpadminbar").length&&(p+=jQuery("#wpadminbar").height()),jQuery("body").append('<div id="wppa-fulls-btn-1" class="wppa-fulls-btn" style="position:fixed;top:'+p+"px;right:"+e+'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:'+p+"px;right:"+e+'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 p=document.documentElement;p.requestFullscreen?p.requestFullscreen():p.mozRequestFullScreen?p.mozRequestFullScreen():p.webkitRequestFullScreen&&p.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())}jQuery(document).ready(function(){"global"==wppaFsPolicy&&wppaGlobalFS(),jQuery(window).on("DOMContentLoaded load",wppaFsShow),jQuery(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange",wppaFsChange)});
5
  // wppa-slideshow
js/wppa-utils.js CHANGED
@@ -2,7 +2,7 @@
2
  //
3
  // conatins common vars and functions
4
  //
5
- wppaJsUtilsVersion = '8.0.00.004';
6
  var wppaDebug;
7
  var wppaDebugCounter = 0;
8
 
@@ -425,6 +425,7 @@ function wppaMakeLazyVisible() {
425
  // Fake a scroll
426
  setTimeout( function(){
427
  jQuery(".wppa-box").trigger("scroll");
 
428
  }, 250);
429
  }
430
 
2
  //
3
  // conatins common vars and functions
4
  //
5
+ wppaJsUtilsVersion = '8.0.00.005';
6
  var wppaDebug;
7
  var wppaDebugCounter = 0;
8
 
425
  // Fake a scroll
426
  setTimeout( function(){
427
  jQuery(".wppa-box").trigger("scroll");
428
+ jQuery("body").trigger("scroll");
429
  }, 250);
430
  }
431
 
js/wppa-utils.min.js CHANGED
@@ -1 +1 @@
1
- var wppaDebug;wppaJsUtilsVersion="8.0.00.004";var wppaMakeLazyVisibleScrollEndTimer,wppaDebugCounter=0;function wppaAnimate(e,t,a,p,i){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css(t),i&&setTimeout(i,10)):jQuery(e).stop().animate(t,a,p,i)}function wppaFadeIn(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:""}),a&&setTimeout(a,10)):jQuery(e).stop().fadeIn(t,a)}function wppaFadeOut(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"none"}),a&&setTimeout(a,10)):jQuery(e).stop().fadeOut(t,a)}function wppaFadeTo(e,t,a,p){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"",opacity:a}),p&&setTimeout(p,10)):jQuery(e).stop().fadeTo(t,a,p)}function wppaTrim(e,t){e=wppaTrimLeft(e,t);return e=wppaTrimRight(e,t)}function wppaTrimLeft(e,t){var a,p,i,n,r,o,s;switch(typeof t){case"string":for(p=(a=e).length,i=t.length;i<=p&&a.substr(0,i)==t;)p=(a=a.substr(i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<t.length;)s=wppaTrimLeft(s,t[n]),n++;r=o==s}a=s;break;default:return e.replace(/^\s\s*/,"")}return a}function wppaTrimRight(e,t){var a,p,i,n,r,o,s;switch(typeof t){case"string":for(p=(a=e).length,i=t.length;i<=p&&a.substr(p-i)==t;)p=(a=a.substr(0,p-i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<t.length;)s=wppaTrimRight(s,t[n]),n++;r=o==s}a=s;break;default:return e.replace(/\s\s*$/,"")}return a}function wppa_setCookie(e,t,a){var p=new Date;p.setDate(p.getDate()+a);p=escape(t)+(null==a?"":"; expires="+p.toUTCString());document.cookie=e+"="+p}function wppa_getCookie(e){for(var t,a,p=document.cookie.split(";"),i=0;i<p.length;i++)if(t=p[i].substr(0,p[i].indexOf("=")),a=p[i].substr(p[i].indexOf("=")+1),(t=t.replace(/^\s+|\s+$/g,""))==e)return unescape(a);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,t){var a,p,i;"undefined"==typeof console||!wppaDebug&&"force"!=t||(a=(new Date).getTime()%864e5,a-=60*(p=Math.floor(a/36e5))*60*1e3,a-=60*(i=Math.floor(a/6e4))*1e3,t=Math.floor(a/1e3),console.log("At: "+p+":"+i+":"+t+"."+(a-=1e3*t)+" message: "+e))}function wppaSvgHtml(e,t,a,p,i,n,r,o){var s;switch(i=i||"0",n=n||"10",r=r||"20",o=o||"50",wppaSvgCornerStyle){case"gif":case"none":radius=i;break;case"light":radius=n;break;case"medium":radius=r;break;case"heavy":radius=o}t=t||"32px",a="Full-Screen"==e||"Exit-Full-Screen"==e?(s=wppaFsFillcolor,wppaFsBgcolor):a?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor),""==s&&(s="transparent"),""==a&&(a="transparent");var l='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="'+(t?"height:"+t+";":"")+"fill:"+s+";background-color:"+a+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":l+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":l+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":l+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":l+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":l+='<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":l+='<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":l+='<path d="M30,0H0V30H30V0z M9 4 L15 10 L21 4 L26 9 L20 15 L26 21 L21 26 L15 20 L9 26 L4 21 L10 15 L4 9Z" />';break;case"Full-Screen":l+='<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":l+='<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":l+='<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":l+='<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:l+='<path d="M30,0H0V30H30V0z" />'}return l+="</g></svg>"}function wppaMakeLazyVisibleScrollEnd(){clearTimeout(wppaMakeLazyVisibleScrollEndTimer),wppaMakeLazyVisibleScrollEndTimer=setTimeout(wppaMakeLazyVisible,wppaScrollEndDelay)}var wppaLastLazy=0,wppaLazyTimer=0,wppaLazyBusy=!1;function wppaMakeLazyVisible(){if(!wppaLazyBusy&&(wppaLazyBusy=!0,wppaInitMasonryPlus(),wppaLazyLoad)){var e,t=new Date,a=t.getTime();if(a<wppaLastLazy+250)return clearTimeout(wppaLazyTimer),wppaLazyTimer=setTimeout(function(){wppaMakeLazyVisible()},100),void(wppaLazyBusy=!1);wppaLastLazy=a,clearTimeout(wppaLazyTimer);var p=0;jQuery("*[data-src]").each(function(){e=jQuery(this).attr("data-src"),(wppaIsElementInViewport(this)||wppaIsMobile)&&(jQuery(this).attr("src",e),jQuery(this).removeAttr("data-src"),p++)}),0<p&&(wppaInitMasonryPlus(),jQuery("div").getNiceScroll&&setTimeout(function(){jQuery("div").getNiceScroll().resize()},500),setTimeout(function(){jQuery(".wppa-box").trigger("scroll")},250)),a=(t=new Date).getTime(),wppaLastLazy=a,wppaLazyBusy=!1}}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 t=jQuery(e);t[0]&&"BODY"!=t[0].nodeName;){if("none"==jQuery(t[0]).css("display"))return!1;t=jQuery(t[0]).parent()}"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);e=e.getBoundingClientRect();return!e||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))}function wppaIconSize(e,t,a){a=a?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==a?t:(wppaIsMini[e]?a/2:a)+"px;"}function wppaEntityDecode(e){return e=(e=(e=(e=(e=e.split("&amp;").join("&")).split("&gt;").join(">")).split("&lt;").join("<")).split("&quot;").join('"')).split("&#39;").join("'")}function wppaSetMaxWidthToParentWidth(e){var t=e.parentNode.clientWidth;jQuery(e).css({maxWidth:t})}function wppaWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function wppaWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}function wppaAdjustControlbar(){var e,t,a=jQuery;wppaOvlOpen&&(t=wppaIsFs()?(a(".wppa-pctl-div-lb").css({position:"fixed",left:0,right:0,bottom:0}),screen.width):(a(".wppa-pctl-div-lb").css({position:"initial"}),a("#wppa-ovl-pan-container").width()),wppaIsMobile&&wppaIsFs()&&(t-=20),t<12*(parseInt(wppaOvlIconSize)+4)?0<(e=parseInt(t/12-4))&&(a(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),a(".wppa-pctl-div-lb").find("span").css({height:e,width:e})):(e=wppaOvlIconSize,a(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),a(".wppa-pctl-div-lb").find("span").css({height:e,width:e})),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()?a(".wppa-pctl-div-lb").css({paddingLeft:10,paddingRight:10}):a(".wppa-pctl-div-lb").css({paddingLeft:0,paddingRight:0}),a(".wppa-pctl-div-lb").css({visibility:"visible"}))}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,t,a){},error:function(e,t,a){wppaConsoleLog("wppaServerLog failed. Error = "+a+", status = "+t,"force")}})}function wppaTimNow(){return(new Date).getTime()}
1
+ var wppaDebug;wppaJsUtilsVersion="8.0.00.005";var wppaMakeLazyVisibleScrollEndTimer,wppaDebugCounter=0;function wppaAnimate(e,t,a,p,i){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css(t),i&&setTimeout(i,10)):jQuery(e).stop().animate(t,a,p,i)}function wppaFadeIn(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:""}),a&&setTimeout(a,10)):jQuery(e).stop().fadeIn(t,a)}function wppaFadeOut(e,t,a){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"none"}),a&&setTimeout(a,10)):jQuery(e).stop().fadeOut(t,a)}function wppaFadeTo(e,t,a,p){wppaIsMobile&&wppaNoAnimateOnMobile?(jQuery(e).css({display:"",opacity:a}),p&&setTimeout(p,10)):jQuery(e).stop().fadeTo(t,a,p)}function wppaTrim(e,t){e=wppaTrimLeft(e,t);return e=wppaTrimRight(e,t)}function wppaTrimLeft(e,t){var a,p,i,n,r,o,s;switch(typeof t){case"string":for(p=(a=e).length,i=t.length;i<=p&&a.substr(0,i)==t;)p=(a=a.substr(i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<t.length;)s=wppaTrimLeft(s,t[n]),n++;r=o==s}a=s;break;default:return e.replace(/^\s\s*/,"")}return a}function wppaTrimRight(e,t){var a,p,i,n,r,o,s;switch(typeof t){case"string":for(p=(a=e).length,i=t.length;i<=p&&a.substr(p-i)==t;)p=(a=a.substr(0,p-i)).length;break;case"object":for(r=!1,s=e;!r;){for(n=0,o=s;n<t.length;)s=wppaTrimRight(s,t[n]),n++;r=o==s}a=s;break;default:return e.replace(/\s\s*$/,"")}return a}function wppa_setCookie(e,t,a){var p=new Date;p.setDate(p.getDate()+a);p=escape(t)+(null==a?"":"; expires="+p.toUTCString());document.cookie=e+"="+p}function wppa_getCookie(e){for(var t,a,p=document.cookie.split(";"),i=0;i<p.length;i++)if(t=p[i].substr(0,p[i].indexOf("=")),a=p[i].substr(p[i].indexOf("=")+1),(t=t.replace(/^\s+|\s+$/g,""))==e)return unescape(a);return""}function wppaStereoTypeChange(e){wppa_setCookie("stereotype",e,365)}function wppaStereoGlassChange(e){wppa_setCookie("stereoglass",e,365)}function wppaConsoleLog(e,t){var a,p,i;"undefined"==typeof console||!wppaDebug&&"force"!=t||(a=(new Date).getTime()%864e5,a-=60*(p=Math.floor(a/36e5))*60*1e3,a-=60*(i=Math.floor(a/6e4))*1e3,t=Math.floor(a/1e3),console.log("At: "+p+":"+i+":"+t+"."+(a-=1e3*t)+" message: "+e))}function wppaSvgHtml(e,t,a,p,i,n,r,o){var s;switch(i=i||"0",n=n||"10",r=r||"20",o=o||"50",wppaSvgCornerStyle){case"gif":case"none":radius=i;break;case"light":radius=n;break;case"medium":radius=r;break;case"heavy":radius=o}t=t||"32px",a="Full-Screen"==e||"Exit-Full-Screen"==e?(s=wppaFsFillcolor,wppaFsBgcolor):a?(s=wppaOvlSvgFillcolor,wppaOvlSvgBgcolor):(s=wppaSvgFillcolor,wppaSvgBgcolor),""==s&&(s="transparent"),""==a&&(a="transparent");var l='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="'+(t?"height:"+t+";":"")+"fill:"+s+";background-color:"+a+";text-decoration:none !important;vertical-align:middle;"+(radius?"border-radius:"+radius+"%;":"")+'" xml:space="preserve" ><g>';switch(e){case"Next-Button":l+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.3-0.2,0.5-0.5,0.5S19,20.8,19,20.5v-4.2l-8.3,4.6c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1c-0.2-0.1-0.2-0.3-0.2-0.4v-11c0-0.2,0.1-0.4,0.3-0.4c0.2-0.1,0.4-0.1,0.5,0l8.2,5.5V9.5C19,9.2,19.2,9,19.5,9S20,9.2,20,9.5V20.5z" />';break;case"Prev-Button":l+='<path d="M30,0H0V30H30V0z M20,20.5c0,0.2-0.1,0.4-0.3,0.4c-0.1,0-0.2,0.1-0.2,0.1c-0.1,0-0.2,0-0.3-0.1L11,15.4v5.1c0,0.3-0.2,0.5-0.5,0.5S10,20.8,10,20.5v-11C10,9.2,10.2,9,10.5,9S11,9.2,11,9.5v4.2l8.3-4.6c0.2-0.1,0.3-0.1,0.5,0S20,9.3,20,9.5V20.5z" />';break;case"Pause-Button":l+='<path d="M30,0H0V30H30V0z M14,20.5c0,0.3-0.2,0.5-0.5,0.5h-4C9.2,21,9,20.8,9,20.5v-11C9,9.2,9.2,9,9.5,9h4C13.8,9,14,9.2,14,9.5V20.5z M21,20.5c0,0.3-0.2,0.5-0.5,0.5h-4c-0.3,0-0.5-0.2-0.5-0.5v-11C16,9.2,16.2,9,16.5,9h4C20.8,9,21,9.2,21,9.5V20.5z" />';break;case"Play-Button":l+='<path d="M30,0H0V30H30V0zM19.8,14.9l-8,5C11.7,20,11.6,20,11.5,20c-0.1,0-0.2,0-0.2-0.1c-0.2-0.1-0.3-0.3-0.3-0.4v-9c0-0.2,0.1-0.3,0.2-0.4c0.1-0.1,0.3-0.1,0.5,0l8,4c0.2,0.1,0.3,0.2,0.3,0.4C20,14.7,19.9,14.8,19.8,14.9z" />';break;case"Stop-Button":l+='<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":l+='<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":l+='<path d="M30,0H0V30H30V0z M9 4 L15 10 L21 4 L26 9 L20 15 L26 21 L21 26 L15 20 L9 26 L4 21 L10 15 L4 9Z" />';break;case"Full-Screen":l+='<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":l+='<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":l+='<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":l+='<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:l+='<path d="M30,0H0V30H30V0z" />'}return l+="</g></svg>"}function wppaMakeLazyVisibleScrollEnd(){clearTimeout(wppaMakeLazyVisibleScrollEndTimer),wppaMakeLazyVisibleScrollEndTimer=setTimeout(wppaMakeLazyVisible,wppaScrollEndDelay)}var wppaLastLazy=0,wppaLazyTimer=0,wppaLazyBusy=!1;function wppaMakeLazyVisible(){if(!wppaLazyBusy&&(wppaLazyBusy=!0,wppaInitMasonryPlus(),wppaLazyLoad)){var e,t=new Date,a=t.getTime();if(a<wppaLastLazy+250)return clearTimeout(wppaLazyTimer),wppaLazyTimer=setTimeout(function(){wppaMakeLazyVisible()},100),void(wppaLazyBusy=!1);wppaLastLazy=a,clearTimeout(wppaLazyTimer);var p=0;jQuery("*[data-src]").each(function(){e=jQuery(this).attr("data-src"),(wppaIsElementInViewport(this)||wppaIsMobile)&&(jQuery(this).attr("src",e),jQuery(this).removeAttr("data-src"),p++)}),0<p&&(wppaInitMasonryPlus(),jQuery("div").getNiceScroll&&setTimeout(function(){jQuery("div").getNiceScroll().resize()},500),setTimeout(function(){jQuery(".wppa-box").trigger("scroll"),jQuery("body").trigger("scroll")},250)),a=(t=new Date).getTime(),wppaLastLazy=a,wppaLazyBusy=!1}}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 t=jQuery(e);t[0]&&"BODY"!=t[0].nodeName;){if("none"==jQuery(t[0]).css("display"))return!1;t=jQuery(t[0]).parent()}"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);e=e.getBoundingClientRect();return!e||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))}function wppaIconSize(e,t,a){a=a?wppaIconSizeSlide:wppaIconSizeNormal;return"default"==a?t:(wppaIsMini[e]?a/2:a)+"px;"}function wppaEntityDecode(e){return e=(e=(e=(e=(e=e.split("&amp;").join("&")).split("&gt;").join(">")).split("&lt;").join("<")).split("&quot;").join('"')).split("&#39;").join("'")}function wppaSetMaxWidthToParentWidth(e){var t=e.parentNode.clientWidth;jQuery(e).css({maxWidth:t})}function wppaWindowHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function wppaWindowWidth(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}function wppaAdjustControlbar(){var e,t,a=jQuery;wppaOvlOpen&&(t=wppaIsFs()?(a(".wppa-pctl-div-lb").css({position:"fixed",left:0,right:0,bottom:0}),screen.width):(a(".wppa-pctl-div-lb").css({position:"initial"}),a("#wppa-ovl-pan-container").width()),wppaIsMobile&&wppaIsFs()&&(t-=20),t<12*(parseInt(wppaOvlIconSize)+4)?0<(e=parseInt(t/12-4))&&(a(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),a(".wppa-pctl-div-lb").find("span").css({height:e,width:e})):(e=wppaOvlIconSize,a(".wppa-pctl-div-lb").find("svg").css({height:e,width:e}),a(".wppa-pctl-div-lb").find("span").css({height:e,width:e})),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()?a(".wppa-pctl-div-lb").css({paddingLeft:10,paddingRight:10}):a(".wppa-pctl-div-lb").css({paddingLeft:0,paddingRight:0}),a(".wppa-pctl-div-lb").css({visibility:"visible"}))}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,t,a){},error:function(e,t,a){wppaConsoleLog("wppaServerLog failed. Error = "+a+", status = "+t,"force")}})}function wppaTimNow(){return(new Date).getTime()}
vendor/nicescroll/jquery.nicescroll.js CHANGED
@@ -2552,7 +2552,8 @@
2552
  q: false
2553
  });
2554
 
2555
- (passiveSupported && active) ? el.addEventListener(name, fn, { passive: false, capture: bubble }) : el.addEventListener(name, fn, bubble || false);
 
2556
  };
2557
 
2558
  this._unbind = function (el, name, fn, bub) { // primitive unbind
2552
  q: false
2553
  });
2554
 
2555
+ // (passiveSupported && active) ? el.addEventListener(name, fn, { passive: false, capture: bubble }) : el.addEventListener(name, fn, bubble || false);
2556
+ (passiveSupported && (active || el == window.document || el == window.document.body || el == window)) ? el.addEventListener(name, fn, { passive: false, capture: bubble }) : el.addEventListener(name, fn, bubble || false);
2557
  };
2558
 
2559
  this._unbind = function (el, name, fn, bub) { // primitive unbind
vendor/nicescroll/jquery.nicescroll.min.js CHANGED
@@ -1,2 +1,2 @@
1
  /* jquery.nicescroll v3.7.6 InuYaksa - MIT - https://nicescroll.areaaperta.com */
2
- !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";var o=!1,t=!1,r=0,i=2e3,s=0,n=e,l=document,a=window,c=n(a),d=[],u=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||!1,h=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.mozCancelAnimationFrame||!1;if(u)a.cancelAnimationFrame||(h=function(e){});else{var p=0;u=function(e,o){var t=(new Date).getTime(),r=Math.max(0,16-(t-p)),i=a.setTimeout(function(){e(t+r)},r);return p=t+r,i},h=function(e){a.clearTimeout(e)}}var m=a.MutationObserver||a.WebKitMutationObserver||!1,f=Date.now||function(){return(new Date).getTime()},g={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:function(){var e=l.currentScript||function(){var e=l.getElementsByTagName("script");return!!e.length&&e[e.length-1]}(),o=e?e.src.split("?")[0]:"";return o.split("/").length>0?o.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1},v=!1,w=function(){if(v)return v;var e=l.createElement("DIV"),o=e.style,t=navigator.userAgent,r=navigator.platform,i={};return i.haspointerlock="pointerLockElement"in l||"webkitPointerLockElement"in l||"mozPointerLockElement"in l,i.isopera="opera"in a,i.isopera12=i.isopera&&"getUserMedia"in navigator,i.isoperamini="[object OperaMini]"===Object.prototype.toString.call(a.operamini),i.isie="all"in l&&"attachEvent"in e&&!i.isopera,i.isieold=i.isie&&!("msInterpolationMode"in o),i.isie7=i.isie&&!i.isieold&&(!("documentMode"in l)||7===l.documentMode),i.isie8=i.isie&&"documentMode"in l&&8===l.documentMode,i.isie9=i.isie&&"performance"in a&&9===l.documentMode,i.isie10=i.isie&&"performance"in a&&10===l.documentMode,i.isie11="msRequestFullscreen"in e&&l.documentMode>=11,i.ismsedge="msCredentials"in a,i.ismozilla="MozAppearance"in o,i.iswebkit=!i.ismsedge&&"WebkitAppearance"in o,i.ischrome=i.iswebkit&&"chrome"in a,i.ischrome38=i.ischrome&&"touchAction"in o,i.ischrome22=!i.ischrome38&&i.ischrome&&i.haspointerlock,i.ischrome26=!i.ischrome38&&i.ischrome&&"transition"in o,i.cantouch="ontouchstart"in l.documentElement||"ontouchstart"in a,i.hasw3ctouch=(a.PointerEvent||!1)&&(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),i.hasmstouch=!i.hasw3ctouch&&(a.MSPointerEvent||!1),i.ismac=/^mac$/i.test(r),i.isios=i.cantouch&&/iphone|ipad|ipod/i.test(r),i.isios4=i.isios&&!("seal"in Object),i.isios7=i.isios&&"webkitHidden"in l,i.isios8=i.isios&&"hidden"in l,i.isios10=i.isios&&a.Proxy,i.isandroid=/android/i.test(t),i.haseventlistener="addEventListener"in e,i.trstyle=!1,i.hastransform=!1,i.hastranslate3d=!1,i.transitionstyle=!1,i.hastransition=!1,i.transitionend=!1,i.trstyle="transform",i.hastransform="transform"in o||function(){for(var e=["msTransform","webkitTransform","MozTransform","OTransform"],t=0,r=e.length;t<r;t++)if(void 0!==o[e[t]]){i.trstyle=e[t];break}i.hastransform=!!i.trstyle}(),i.hastransform&&(o[i.trstyle]="translate3d(1px,2px,3px)",i.hastranslate3d=/translate3d/.test(o[i.trstyle])),i.transitionstyle="transition",i.prefixstyle="",i.transitionend="transitionend",i.hastransition="transition"in o||function(){i.transitionend=!1;for(var e=["webkitTransition","msTransition","MozTransition","OTransition","OTransition","KhtmlTransition"],t=["-webkit-","-ms-","-moz-","-o-","-o","-khtml-"],r=["webkitTransitionEnd","msTransitionEnd","transitionend","otransitionend","oTransitionEnd","KhtmlTransitionEnd"],s=0,n=e.length;s<n;s++)if(e[s]in o){i.transitionstyle=e[s],i.prefixstyle=t[s],i.transitionend=r[s];break}i.ischrome26&&(i.prefixstyle=t[1]),i.hastransition=i.transitionstyle}(),i.cursorgrabvalue=function(){var e=["grab","-webkit-grab","-moz-grab"];(i.ischrome&&!i.ischrome38||i.isie)&&(e=[]);for(var t=0,r=e.length;t<r;t++){var s=e[t];if(o.cursor=s,o.cursor==s)return s}return"url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize"}(),i.hasmousecapture="setCapture"in e,i.hasMutationObserver=!1!==m,e=null,v=i,i},b=function(e,p){function v(){var e=T.doc.css(P.trstyle);return!(!e||"matrix"!=e.substr(0,6))&&e.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}function b(){var e=T.win;if("zIndex"in e)return e.zIndex();for(;e.length>0;){if(9==e[0].nodeType)return!1;var o=e.css("zIndex");if(!isNaN(o)&&0!==o)return parseInt(o);e=e.parent()}return!1}function x(e,o,t){var r=e.css(o),i=parseFloat(r);if(isNaN(i)){var s=3==(i=I[r]||0)?t?T.win.outerHeight()-T.win.innerHeight():T.win.outerWidth()-T.win.innerWidth():1;return T.isie8&&i&&(i+=1),s?i:0}return i}function S(e,o,t,r){T._bind(e,o,function(r){var i={original:r=r||a.event,target:r.target||r.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==r.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return r.preventDefault?r.preventDefault():r.returnValue=!1,!1},stopImmediatePropagation:function(){r.stopImmediatePropagation?r.stopImmediatePropagation():r.cancelBubble=!0}};return"mousewheel"==o?(r.wheelDeltaX&&(i.deltaX=-.025*r.wheelDeltaX),r.wheelDeltaY&&(i.deltaY=-.025*r.wheelDeltaY),!i.deltaY&&!i.deltaX&&(i.deltaY=-.025*r.wheelDelta)):i.deltaY=r.detail,t.call(e,i)},r)}function z(e,o,t,r){T.scrollrunning||(T.newscrolly=T.getScrollTop(),T.newscrollx=T.getScrollLeft(),D=f());var i=f()-D;if(D=f(),i>350?A=1:A+=(2-A)/10,e=e*A|0,o=o*A|0,e){if(r)if(e<0){if(T.getScrollLeft()>=T.page.maxw)return!0}else if(T.getScrollLeft()<=0)return!0;var s=e>0?1:-1;X!==s&&(T.scrollmom&&T.scrollmom.stop(),T.newscrollx=T.getScrollLeft(),X=s),T.lastdeltax-=e}if(o){if(function(){var e=T.getScrollTop();if(o<0){if(e>=T.page.maxh)return!0}else if(e<=0)return!0}()){if(M.nativeparentscrolling&&t&&!T.ispage&&!T.zoomactive)return!0;var n=T.view.h>>1;T.newscrolly<-n?(T.newscrolly=-n,o=-1):T.newscrolly>T.page.maxh+n?(T.newscrolly=T.page.maxh+n,o=1):o=0}var l=o>0?1:-1;B!==l&&(T.scrollmom&&T.scrollmom.stop(),T.newscrolly=T.getScrollTop(),B=l),T.lastdeltay-=o}(o||e)&&T.synched("relativexy",function(){var e=T.lastdeltay+T.newscrolly;T.lastdeltay=0;var o=T.lastdeltax+T.newscrollx;T.lastdeltax=0,T.rail.drag||T.doScrollPos(o,e)})}function k(e,o,t){var r,i;return!(t||!q)||(0===e.deltaMode?(r=-e.deltaX*(M.mousescrollstep/54)|0,i=-e.deltaY*(M.mousescrollstep/54)|0):1===e.deltaMode&&(r=-e.deltaX*M.mousescrollstep*50/80|0,i=-e.deltaY*M.mousescrollstep*50/80|0),o&&M.oneaxismousemode&&0===r&&i&&(r=i,i=0,t&&(r<0?T.getScrollLeft()>=T.page.maxw:T.getScrollLeft()<=0)&&(i=r,r=0)),T.isrtlmode&&(r=-r),z(r,i,t,!0)?void(t&&(q=!0)):(q=!1,e.stopImmediatePropagation(),e.preventDefault()))}var T=this;this.version="3.7.6",this.name="nicescroll",this.me=p;var E=n("body"),M=this.opt={doc:E,win:!1};if(n.extend(M,g),M.snapbackspeed=80,e)for(var L in M)void 0!==e[L]&&(M[L]=e[L]);if(M.disablemutationobserver&&(m=!1),this.doc=M.doc,this.iddoc=this.doc&&this.doc[0]?this.doc[0].id||"":"",this.ispage=/^BODY|HTML/.test(M.win?M.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==M.win,this.win=M.win||(this.ispage?c:this.doc),this.docscroll=this.ispage&&!this.haswrapper?c:this.win,this.body=E,this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=M.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,"auto"==M.rtlmode){var C=this.win[0]==a?this.body:this.win,N=C.css("writing-mode")||C.css("-webkit-writing-mode")||C.css("-ms-writing-mode")||C.css("-moz-writing-mode");"horizontal-tb"==N||"lr-tb"==N||""===N?(this.isrtlmode="rtl"==C.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==N||"tb"==N||"tb-rl"==N||"rl-tb"==N,this.isvertical="vertical-rl"==N||"tb"==N||"tb-rl"==N)}else this.isrtlmode=!0===M.rtlmode,this.isvertical=!1;if(this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,this.observerbody=!1,!1!==M.scrollbarid)this.id=M.scrollbarid;else do{this.id="ascrail"+i++}while(l.getElementById(this.id));this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=M.overflowx,this.overflowy=M.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=w();var P=n.extend({},this.detected);this.canhwscroll=P.hastransform&&M.hwacceleration,this.ishwscroll=this.canhwscroll&&T.haswrapper,this.isrtlmode?this.isvertical?this.hasreversehr=!(P.iswebkit||P.isie||P.isie11):this.hasreversehr=!(P.iswebkit||P.isie&&!P.isie10&&!P.isie11):this.hasreversehr=!1,this.istouchcapable=!1,P.cantouch||!P.hasw3ctouch&&!P.hasmstouch?!P.cantouch||P.isios||P.isandroid||!P.iswebkit&&!P.ismozilla||(this.istouchcapable=!0):this.istouchcapable=!0,M.enablemouselockapi||(P.hasmousecapture=!1,P.haspointerlock=!1),this.debounced=function(e,o,t){T&&(T.delaylist[e]||!1||(T.delaylist[e]={h:u(function(){T.delaylist[e].fn.call(T),T.delaylist[e]=!1},t)},o.call(T)),T.delaylist[e].fn=o)},this.synched=function(e,o){T.synclist[e]?T.synclist[e]=o:(T.synclist[e]=o,u(function(){T&&(T.synclist[e]&&T.synclist[e].call(T),T.synclist[e]=null)}))},this.unsynched=function(e){T.synclist[e]&&(T.synclist[e]=!1)},this.css=function(e,o){for(var t in o)T.saved.css.push([e,t,e.css(t)]),e.css(t,o[t])},this.scrollTop=function(e){return void 0===e?T.getScrollTop():T.setScrollTop(e)},this.scrollLeft=function(e){return void 0===e?T.getScrollLeft():T.setScrollLeft(e)};var R=function(e,o,t,r,i,s,n){this.st=e,this.ed=o,this.spd=t,this.p1=r||0,this.p2=i||1,this.p3=s||0,this.p4=n||1,this.ts=f(),this.df=o-e};if(R.prototype={B2:function(e){return 3*(1-e)*(1-e)*e},B3:function(e){return 3*(1-e)*e*e},B4:function(e){return e*e*e},getPos:function(){return(f()-this.ts)/this.spd},getNow:function(){var e=(f()-this.ts)/this.spd,o=this.B2(e)+this.B3(e)+this.B4(e);return e>=1?this.ed:this.st+this.df*o|0},update:function(e,o){return this.st=this.getNow(),this.ed=e,this.spd=o,this.ts=f(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},P.hastranslate3d&&P.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(e){if(!e){var o=v();if(o)return 16==o.length?-o[13]:-o[5];if(T.timerscroll&&T.timerscroll.bz)return T.timerscroll.bz.getNow()}return T.doc.translate.y},this.getScrollLeft=function(e){if(!e){var o=v();if(o)return 16==o.length?-o[12]:-o[4];if(T.timerscroll&&T.timerscroll.bh)return T.timerscroll.bh.getNow()}return T.doc.translate.x},this.notifyScrollEvent=function(e){var o=l.createEvent("UIEvents");o.initUIEvent("scroll",!1,!1,a,1),o.niceevent=!0,e.dispatchEvent(o)};var _=this.isrtlmode?1:-1;P.hastranslate3d&&M.enabletranslate3d?(this.setScrollTop=function(e,o){T.doc.translate.y=e,T.doc.translate.ty=-1*e+"px",T.doc.css(P.trstyle,"translate3d("+T.doc.translate.tx+","+T.doc.translate.ty+",0)"),o||T.notifyScrollEvent(T.win[0])},this.setScrollLeft=function(e,o){T.doc.translate.x=e,T.doc.translate.tx=e*_+"px",T.doc.css(P.trstyle,"translate3d("+T.doc.translate.tx+","+T.doc.translate.ty+",0)"),o||T.notifyScrollEvent(T.win[0])}):(this.setScrollTop=function(e,o){T.doc.translate.y=e,T.doc.translate.ty=-1*e+"px",T.doc.css(P.trstyle,"translate("+T.doc.translate.tx+","+T.doc.translate.ty+")"),o||T.notifyScrollEvent(T.win[0])},this.setScrollLeft=function(e,o){T.doc.translate.x=e,T.doc.translate.tx=e*_+"px",T.doc.css(P.trstyle,"translate("+T.doc.translate.tx+","+T.doc.translate.ty+")"),o||T.notifyScrollEvent(T.win[0])})}else this.getScrollTop=function(){return T.docscroll.scrollTop()},this.setScrollTop=function(e){T.docscroll.scrollTop(e)},this.getScrollLeft=function(){return T.hasreversehr?T.detected.ismozilla?T.page.maxw-Math.abs(T.docscroll.scrollLeft()):T.page.maxw-T.docscroll.scrollLeft():T.docscroll.scrollLeft()},this.setScrollLeft=function(e){return setTimeout(function(){if(T)return T.hasreversehr&&(e=T.detected.ismozilla?-(T.page.maxw-e):T.page.maxw-e),T.docscroll.scrollLeft(e)},1)};this.getTarget=function(e){return!!e&&(e.target?e.target:!!e.srcElement&&e.srcElement)},this.hasParent=function(e,o){if(!e)return!1;for(var t=e.target||e.srcElement||e||!1;t&&t.id!=o;)t=t.parentNode||!1;return!1!==t};var I={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:a.pageYOffset||l.documentElement.scrollTop,left:a.pageXOffset||l.documentElement.scrollLeft}},this.getOffset=function(){if(T.isfixed){var e=T.win.offset(),o=T.getDocumentScrollOffset();return e.top-=o.top,e.left-=o.left,e}var t=T.win.offset();if(!T.viewport)return t;var r=T.viewport.offset();return{top:t.top-r.top,left:t.left-r.left}},this.updateScrollBar=function(e){var o,t;if(T.ishwscroll)T.rail.css({height:T.win.innerHeight()-(M.railpadding.top+M.railpadding.bottom)}),T.railh&&T.railh.css({width:T.win.innerWidth()-(M.railpadding.left+M.railpadding.right)});else{var r=T.getOffset();if(o={top:r.top,left:r.left-(M.railpadding.left+M.railpadding.right)},o.top+=x(T.win,"border-top-width",!0),o.left+=T.rail.align?T.win.outerWidth()-x(T.win,"border-right-width")-T.rail.width:x(T.win,"border-left-width"),(t=M.railoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left)),T.railslocked||T.rail.css({top:o.top,left:o.left,height:(e?e.h:T.win.innerHeight())-(M.railpadding.top+M.railpadding.bottom)}),T.zoom&&T.zoom.css({top:o.top+1,left:1==T.rail.align?o.left-20:o.left+T.rail.width+4}),T.railh&&!T.railslocked){o={top:r.top,left:r.left},(t=M.railhoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left));var i=T.railh.align?o.top+x(T.win,"border-top-width",!0)+T.win.innerHeight()-T.railh.height:o.top+x(T.win,"border-top-width",!0),s=o.left+x(T.win,"border-left-width");T.railh.css({top:i-(M.railpadding.top+M.railpadding.bottom),left:s,width:T.railh.width})}}},this.doRailClick=function(e,o,t){var r,i,s,n;T.railslocked||(T.cancelEvent(e),"pageY"in e||(e.pageX=e.clientX+l.documentElement.scrollLeft,e.pageY=e.clientY+l.documentElement.scrollTop),o?(r=t?T.doScrollLeft:T.doScrollTop,s=t?(e.pageX-T.railh.offset().left-T.cursorwidth/2)*T.scrollratio.x:(e.pageY-T.rail.offset().top-T.cursorheight/2)*T.scrollratio.y,T.unsynched("relativexy"),r(0|s)):(r=t?T.doScrollLeftBy:T.doScrollBy,s=t?T.scroll.x:T.scroll.y,n=t?e.pageX-T.railh.offset().left:e.pageY-T.rail.offset().top,i=t?T.view.w:T.view.h,r(s>=n?i:-i)))},T.newscrolly=T.newscrollx=0,T.hasanimationframe="requestAnimationFrame"in a,T.hascancelanimationframe="cancelAnimationFrame"in a,T.hasborderbox=!1,this.init=function(){if(T.saved.css=[],P.isoperamini)return!0;if(P.isandroid&&!("hidden"in l))return!0;M.emulatetouch=M.emulatetouch||M.touchbehavior,T.hasborderbox=a.getComputedStyle&&"border-box"===a.getComputedStyle(l.body)["box-sizing"];var e={"overflow-y":"hidden"};if((P.isie11||P.isie10)&&(e["-ms-overflow-style"]="none"),T.ishwscroll&&(this.doc.css(P.transitionstyle,P.prefixstyle+"transform 0ms ease-out"),P.transitionend&&T.bind(T.doc,P.transitionend,T.onScrollTransitionEnd,!1)),T.zindex="auto",T.ispage||"auto"!=M.zindex?T.zindex=M.zindex:T.zindex=b()||"auto",!T.ispage&&"auto"!=T.zindex&&T.zindex>s&&(s=T.zindex),T.isie&&0===T.zindex&&"auto"==M.zindex&&(T.zindex="auto"),!T.ispage||!P.isieold){var i=T.docscroll;T.ispage&&(i=T.haswrapper?T.win:T.doc),T.css(i,e),T.ispage&&(P.isie11||P.isie)&&T.css(n("html"),e),!P.isios||T.ispage||T.haswrapper||T.css(E,{"-webkit-overflow-scrolling":"touch"});var d=n(l.createElement("div"));d.css({position:"relative",top:0,float:"right",width:M.cursorwidth,height:0,"background-color":M.cursorcolor,border:M.cursorborder,"background-clip":"padding-box","-webkit-border-radius":M.cursorborderradius,"-moz-border-radius":M.cursorborderradius,"border-radius":M.cursorborderradius}),d.addClass("nicescroll-cursors"),T.cursor=d;var u=n(l.createElement("div"));u.attr("id",T.id),u.addClass("nicescroll-rails nicescroll-rails-vr");var h,p,f=["left","right","top","bottom"];for(var g in f)p=f[g],(h=M.railpadding[p]||0)&&u.css("padding-"+p,h+"px");u.append(d),u.width=Math.max(parseFloat(M.cursorwidth),d.outerWidth()),u.css({width:u.width+"px",zIndex:T.zindex,background:M.background,cursor:"default"}),u.visibility=!0,u.scrollable=!0,u.align="left"==M.railalign?0:1,T.rail=u,T.rail.drag=!1;var v=!1;!M.boxzoom||T.ispage||P.isieold||(v=l.createElement("div"),T.bind(v,"click",T.doZoom),T.bind(v,"mouseenter",function(){T.zoom.css("opacity",M.cursoropacitymax)}),T.bind(v,"mouseleave",function(){T.zoom.css("opacity",M.cursoropacitymin)}),T.zoom=n(v),T.zoom.css({cursor:"pointer",zIndex:T.zindex,backgroundImage:"url("+M.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),M.dblclickzoom&&T.bind(T.win,"dblclick",T.doZoom),P.cantouch&&M.gesturezoom&&(T.ongesturezoom=function(e){return e.scale>1.5&&T.doZoomIn(e),e.scale<.8&&T.doZoomOut(e),T.cancelEvent(e)},T.bind(T.win,"gestureend",T.ongesturezoom))),T.railh=!1;var w;if(M.horizrailenabled&&(T.css(i,{overflowX:"hidden"}),(d=n(l.createElement("div"))).css({position:"absolute",top:0,height:M.cursorwidth,width:0,backgroundColor:M.cursorcolor,border:M.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":M.cursorborderradius,"-moz-border-radius":M.cursorborderradius,"border-radius":M.cursorborderradius}),P.isieold&&d.css("overflow","hidden"),d.addClass("nicescroll-cursors"),T.cursorh=d,(w=n(l.createElement("div"))).attr("id",T.id+"-hr"),w.addClass("nicescroll-rails nicescroll-rails-hr"),w.height=Math.max(parseFloat(M.cursorwidth),d.outerHeight()),w.css({height:w.height+"px",zIndex:T.zindex,background:M.background}),w.append(d),w.visibility=!0,w.scrollable=!0,w.align="top"==M.railvalign?0:1,T.railh=w,T.railh.drag=!1),T.ispage)u.css({position:"fixed",top:0,height:"100%"}),u.css(u.align?{right:0}:{left:0}),T.body.append(u),T.railh&&(w.css({position:"fixed",left:0,width:"100%"}),w.css(w.align?{bottom:0}:{top:0}),T.body.append(w));else{if(T.ishwscroll){"static"==T.win.css("position")&&T.css(T.win,{position:"relative"});var x="HTML"==T.win[0].nodeName?T.body:T.win;n(x).scrollTop(0).scrollLeft(0),T.zoom&&(T.zoom.css({position:"absolute",top:1,right:0,"margin-right":u.width+4}),x.append(T.zoom)),u.css({position:"absolute",top:0}),u.css(u.align?{right:0}:{left:0}),x.append(u),w&&(w.css({position:"absolute",left:0,bottom:0}),w.css(w.align?{bottom:0}:{top:0}),x.append(w))}else{T.isfixed="fixed"==T.win.css("position");var S=T.isfixed?"fixed":"absolute";T.isfixed||(T.viewport=T.getViewport(T.win[0])),T.viewport&&(T.body=T.viewport,/fixed|absolute/.test(T.viewport.css("position"))||T.css(T.viewport,{position:"relative"})),u.css({position:S}),T.zoom&&T.zoom.css({position:S}),T.updateScrollBar(),T.body.append(u),T.zoom&&T.body.append(T.zoom),T.railh&&(w.css({position:S}),T.body.append(w))}P.isios&&T.css(T.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),M.disableoutline&&(P.isie&&T.win.attr("hideFocus","true"),P.iswebkit&&T.win.css("outline","none"))}if(!1===M.autohidemode?(T.autohidedom=!1,T.rail.css({opacity:M.cursoropacitymax}),T.railh&&T.railh.css({opacity:M.cursoropacitymax})):!0===M.autohidemode||"leave"===M.autohidemode?(T.autohidedom=n().add(T.rail),P.isie8&&(T.autohidedom=T.autohidedom.add(T.cursor)),T.railh&&(T.autohidedom=T.autohidedom.add(T.railh)),T.railh&&P.isie8&&(T.autohidedom=T.autohidedom.add(T.cursorh))):"scroll"==M.autohidemode?(T.autohidedom=n().add(T.rail),T.railh&&(T.autohidedom=T.autohidedom.add(T.railh))):"cursor"==M.autohidemode?(T.autohidedom=n().add(T.cursor),T.railh&&(T.autohidedom=T.autohidedom.add(T.cursorh))):"hidden"==M.autohidemode&&(T.autohidedom=!1,T.hide(),T.railslocked=!1),P.cantouch||T.istouchcapable||M.emulatetouch||P.hasmstouch){T.scrollmom=new y(T);T.ontouchstart=function(e){if(T.locked)return!1;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;if(T.hasmoving=!1,T.scrollmom.timer&&(T.triggerScrollEnd(),T.scrollmom.stop()),!T.railslocked){var o=T.getTarget(e);if(o&&/INPUT/i.test(o.nodeName)&&/range/i.test(o.type))return T.stopPropagation(e);var t="mousedown"===e.type;if(!("clientX"in e)&&"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),T.forcescreen){var r=e;(e={original:e.original?e.original:e}).clientX=r.screenX,e.clientY=r.screenY}if(T.rail.drag={x:e.clientX,y:e.clientY,sx:T.scroll.x,sy:T.scroll.y,st:T.getScrollTop(),sl:T.getScrollLeft(),pt:2,dl:!1,tg:o},T.ispage||!M.directionlockdeadzone)T.rail.drag.dl="f";else{var i={w:c.width(),h:c.height()},s=T.getContentSize(),l=s.h-i.h,a=s.w-i.w;T.rail.scrollable&&!T.railh.scrollable?T.rail.drag.ck=l>0&&"v":!T.rail.scrollable&&T.railh.scrollable?T.rail.drag.ck=a>0&&"h":T.rail.drag.ck=!1}if(M.emulatetouch&&T.isiframe&&P.isie){var d=T.win.position();T.rail.drag.x+=d.left,T.rail.drag.y+=d.top}if(T.hasmoving=!1,T.lastmouseup=!1,T.scrollmom.reset(e.clientX,e.clientY),o&&t){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(o.nodeName))return P.hasmousecapture&&o.setCapture(),M.emulatetouch?(o.onclick&&!o._onclick&&(o._onclick=o.onclick,o.onclick=function(e){if(T.hasmoving)return!1;o._onclick.call(this,e)}),T.cancelEvent(e)):T.stopPropagation(e);/SUBMIT|CANCEL|BUTTON/i.test(n(o).attr("type"))&&(T.preventclick={tg:o,click:!1})}}},T.ontouchend=function(e){if(!T.rail.drag)return!0;if(2==T.rail.drag.pt){if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;T.rail.drag=!1;var o="mouseup"===e.type;if(T.hasmoving&&(T.scrollmom.doMomentum(),T.lastmouseup=!0,T.hideCursor(),P.hasmousecapture&&l.releaseCapture(),o))return T.cancelEvent(e)}else if(1==T.rail.drag.pt)return T.onmouseup(e)};var z=M.emulatetouch&&T.isiframe&&!P.hasmousecapture,k=.3*M.directionlockdeadzone|0;T.ontouchmove=function(e,o){if(!T.rail.drag)return!0;if(e.targetTouches&&M.preventmultitouchscrolling&&e.targetTouches.length>1)return!0;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!0;if(2==T.rail.drag.pt){"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY);var t,r;if(r=t=0,z&&!o){var i=T.win.position();r=-i.left,t=-i.top}var s=e.clientY+t,n=s-T.rail.drag.y,a=e.clientX+r,c=a-T.rail.drag.x,d=T.rail.drag.st-n;if(T.ishwscroll&&M.bouncescroll)d<0?d=Math.round(d/2):d>T.page.maxh&&(d=T.page.maxh+Math.round((d-T.page.maxh)/2));else if(d<0?(d=0,s=0):d>T.page.maxh&&(d=T.page.maxh,s=0),0===s&&!T.hasmoving)return T.ispage||(T.rail.drag=!1),!0;var u=T.getScrollLeft();if(T.railh&&T.railh.scrollable&&(u=T.isrtlmode?c-T.rail.drag.sl:T.rail.drag.sl-c,T.ishwscroll&&M.bouncescroll?u<0?u=Math.round(u/2):u>T.page.maxw&&(u=T.page.maxw+Math.round((u-T.page.maxw)/2)):(u<0&&(u=0,a=0),u>T.page.maxw&&(u=T.page.maxw,a=0))),!T.hasmoving){if(T.rail.drag.y===e.clientY&&T.rail.drag.x===e.clientX)return T.cancelEvent(e);var h=Math.abs(n),p=Math.abs(c),m=M.directionlockdeadzone;if(T.rail.drag.ck?"v"==T.rail.drag.ck?p>m&&h<=k?T.rail.drag=!1:h>m&&(T.rail.drag.dl="v"):"h"==T.rail.drag.ck&&(h>m&&p<=k?T.rail.drag=!1:p>m&&(T.rail.drag.dl="h")):h>m&&p>m?T.rail.drag.dl="f":h>m?T.rail.drag.dl=p>k?"f":"v":p>m&&(T.rail.drag.dl=h>k?"f":"h"),!T.rail.drag.dl)return T.cancelEvent(e);T.triggerScrollStart(e.clientX,e.clientY,0,0,0),T.hasmoving=!0}return T.preventclick&&!T.preventclick.click&&(T.preventclick.click=T.preventclick.tg.onclick||!1,T.preventclick.tg.onclick=T.onpreventclick),T.rail.drag.dl&&("v"==T.rail.drag.dl?u=T.rail.drag.sl:"h"==T.rail.drag.dl&&(d=T.rail.drag.st)),T.synched("touchmove",function(){T.rail.drag&&2==T.rail.drag.pt&&(T.prepareTransition&&T.resetTransition(),T.rail.scrollable&&T.setScrollTop(d),T.scrollmom.update(a,s),T.railh&&T.railh.scrollable?(T.setScrollLeft(u),T.showCursor(d,u)):T.showCursor(d),P.isie10&&l.selection.clear())}),T.cancelEvent(e)}return 1==T.rail.drag.pt?T.onmousemove(e):void 0},T.ontouchstartCursor=function(e,o){if(!T.rail.drag||3==T.rail.drag.pt){if(T.locked)return T.cancelEvent(e);T.cancelScroll(),T.rail.drag={x:e.touches[0].clientX,y:e.touches[0].clientY,sx:T.scroll.x,sy:T.scroll.y,pt:3,hr:!!o};var t=T.getTarget(e);return!T.ispage&&P.hasmousecapture&&t.setCapture(),T.isiframe&&!P.hasmousecapture&&(T.saved.csspointerevents=T.doc.css("pointer-events"),T.css(T.doc,{"pointer-events":"none"})),T.cancelEvent(e)}},T.ontouchendCursor=function(e){if(T.rail.drag){if(P.hasmousecapture&&l.releaseCapture(),T.isiframe&&!P.hasmousecapture&&T.doc.css("pointer-events",T.saved.csspointerevents),3!=T.rail.drag.pt)return;return T.rail.drag=!1,T.cancelEvent(e)}},T.ontouchmoveCursor=function(e){if(T.rail.drag){if(3!=T.rail.drag.pt)return;if(T.cursorfreezed=!0,T.rail.drag.hr){T.scroll.x=T.rail.drag.sx+(e.touches[0].clientX-T.rail.drag.x),T.scroll.x<0&&(T.scroll.x=0);var o=T.scrollvaluemaxw;T.scroll.x>o&&(T.scroll.x=o)}else{T.scroll.y=T.rail.drag.sy+(e.touches[0].clientY-T.rail.drag.y),T.scroll.y<0&&(T.scroll.y=0);var t=T.scrollvaluemax;T.scroll.y>t&&(T.scroll.y=t)}return T.synched("touchmove",function(){T.rail.drag&&3==T.rail.drag.pt&&(T.showCursor(),T.rail.drag.hr?T.doScrollLeft(Math.round(T.scroll.x*T.scrollratio.x),M.cursordragspeed):T.doScrollTop(Math.round(T.scroll.y*T.scrollratio.y),M.cursordragspeed))}),T.cancelEvent(e)}}}if(T.onmousedown=function(e,o){if(!T.rail.drag||1==T.rail.drag.pt){if(T.railslocked)return T.cancelEvent(e);T.cancelScroll(),T.rail.drag={x:e.clientX,y:e.clientY,sx:T.scroll.x,sy:T.scroll.y,pt:1,hr:o||!1};var t=T.getTarget(e);return P.hasmousecapture&&t.setCapture(),T.isiframe&&!P.hasmousecapture&&(T.saved.csspointerevents=T.doc.css("pointer-events"),T.css(T.doc,{"pointer-events":"none"})),T.hasmoving=!1,T.cancelEvent(e)}},T.onmouseup=function(e){if(T.rail.drag)return 1!=T.rail.drag.pt||(P.hasmousecapture&&l.releaseCapture(),T.isiframe&&!P.hasmousecapture&&T.doc.css("pointer-events",T.saved.csspointerevents),T.rail.drag=!1,T.cursorfreezed=!1,T.hasmoving&&T.triggerScrollEnd(),T.cancelEvent(e))},T.onmousemove=function(e){if(T.rail.drag){if(1!==T.rail.drag.pt)return;if(P.ischrome&&0===e.which)return T.onmouseup(e);if(T.cursorfreezed=!0,T.hasmoving||T.triggerScrollStart(e.clientX,e.clientY,0,0,0),T.hasmoving=!0,T.rail.drag.hr){T.scroll.x=T.rail.drag.sx+(e.clientX-T.rail.drag.x),T.scroll.x<0&&(T.scroll.x=0);var o=T.scrollvaluemaxw;T.scroll.x>o&&(T.scroll.x=o)}else{T.scroll.y=T.rail.drag.sy+(e.clientY-T.rail.drag.y),T.scroll.y<0&&(T.scroll.y=0);var t=T.scrollvaluemax;T.scroll.y>t&&(T.scroll.y=t)}return T.synched("mousemove",function(){T.cursorfreezed&&(T.showCursor(),T.rail.drag.hr?T.scrollLeft(Math.round(T.scroll.x*T.scrollratio.x)):T.scrollTop(Math.round(T.scroll.y*T.scrollratio.y)))}),T.cancelEvent(e)}T.checkarea=0},P.cantouch||M.emulatetouch)T.onpreventclick=function(e){if(T.preventclick)return T.preventclick.tg.onclick=T.preventclick.click,T.preventclick=!1,T.cancelEvent(e)},T.onclick=!P.isios&&function(e){return!T.lastmouseup||(T.lastmouseup=!1,T.cancelEvent(e))},M.grabcursorenabled&&P.cursorgrabvalue&&(T.css(T.ispage?T.doc:T.win,{cursor:P.cursorgrabvalue}),T.css(T.rail,{cursor:P.cursorgrabvalue}));else{var L=function(e){if(T.selectiondrag){if(e){var o=T.win.outerHeight(),t=e.pageY-T.selectiondrag.top;t>0&&t<o&&(t=0),t>=o&&(t-=o),T.selectiondrag.df=t}if(0!==T.selectiondrag.df){var r=-2*T.selectiondrag.df/6|0;T.doScrollBy(r),T.debounced("doselectionscroll",function(){L()},50)}}};T.hasTextSelected="getSelection"in l?function(){return l.getSelection().rangeCount>0}:"selection"in l?function(){return"None"!=l.selection.type}:function(){return!1},T.onselectionstart=function(e){T.ispage||(T.selectiondrag=T.win.offset())},T.onselectionend=function(e){T.selectiondrag=!1},T.onselectiondrag=function(e){T.selectiondrag&&T.hasTextSelected()&&T.debounced("selectionscroll",function(){L(e)},250)}}if(P.hasw3ctouch?(T.css(T.ispage?n("html"):T.win,{"touch-action":"none"}),T.css(T.rail,{"touch-action":"none"}),T.css(T.cursor,{"touch-action":"none"}),T.bind(T.win,"pointerdown",T.ontouchstart),T.bind(l,"pointerup",T.ontouchend),T.delegate(l,"pointermove",T.ontouchmove)):P.hasmstouch?(T.css(T.ispage?n("html"):T.win,{"-ms-touch-action":"none"}),T.css(T.rail,{"-ms-touch-action":"none"}),T.css(T.cursor,{"-ms-touch-action":"none"}),T.bind(T.win,"MSPointerDown",T.ontouchstart),T.bind(l,"MSPointerUp",T.ontouchend),T.delegate(l,"MSPointerMove",T.ontouchmove),T.bind(T.cursor,"MSGestureHold",function(e){e.preventDefault()}),T.bind(T.cursor,"contextmenu",function(e){e.preventDefault()})):P.cantouch&&(T.bind(T.win,"touchstart",T.ontouchstart,!1,!0),T.bind(l,"touchend",T.ontouchend,!1,!0),T.bind(l,"touchcancel",T.ontouchend,!1,!0),T.delegate(l,"touchmove",T.ontouchmove,!1,!0)),M.emulatetouch&&(T.bind(T.win,"mousedown",T.ontouchstart,!1,!0),T.bind(l,"mouseup",T.ontouchend,!1,!0),T.bind(l,"mousemove",T.ontouchmove,!1,!0)),(M.cursordragontouch||!P.cantouch&&!M.emulatetouch)&&(T.rail.css({cursor:"default"}),T.railh&&T.railh.css({cursor:"default"}),T.jqbind(T.rail,"mouseenter",function(){if(!T.ispage&&!T.win.is(":visible"))return!1;T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.rail,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}),M.sensitiverail&&(T.bind(T.rail,"click",function(e){T.doRailClick(e,!1,!1)}),T.bind(T.rail,"dblclick",function(e){T.doRailClick(e,!0,!1)}),T.bind(T.cursor,"click",function(e){T.cancelEvent(e)}),T.bind(T.cursor,"dblclick",function(e){T.cancelEvent(e)})),T.railh&&(T.jqbind(T.railh,"mouseenter",function(){if(!T.ispage&&!T.win.is(":visible"))return!1;T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.railh,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}),M.sensitiverail&&(T.bind(T.railh,"click",function(e){T.doRailClick(e,!1,!0)}),T.bind(T.railh,"dblclick",function(e){T.doRailClick(e,!0,!0)}),T.bind(T.cursorh,"click",function(e){T.cancelEvent(e)}),T.bind(T.cursorh,"dblclick",function(e){T.cancelEvent(e)})))),M.cursordragontouch&&(this.istouchcapable||P.cantouch)&&(T.bind(T.cursor,"touchstart",T.ontouchstartCursor),T.bind(T.cursor,"touchmove",T.ontouchmoveCursor),T.bind(T.cursor,"touchend",T.ontouchendCursor),T.cursorh&&T.bind(T.cursorh,"touchstart",function(e){T.ontouchstartCursor(e,!0)}),T.cursorh&&T.bind(T.cursorh,"touchmove",T.ontouchmoveCursor),T.cursorh&&T.bind(T.cursorh,"touchend",T.ontouchendCursor)),M.emulatetouch||P.isandroid||P.isios?(T.bind(P.hasmousecapture?T.win:l,"mouseup",T.ontouchend),T.onclick&&T.bind(l,"click",T.onclick),M.cursordragontouch?(T.bind(T.cursor,"mousedown",T.onmousedown),T.bind(T.cursor,"mouseup",T.onmouseup),T.cursorh&&T.bind(T.cursorh,"mousedown",function(e){T.onmousedown(e,!0)}),T.cursorh&&T.bind(T.cursorh,"mouseup",T.onmouseup)):(T.bind(T.rail,"mousedown",function(e){e.preventDefault()}),T.railh&&T.bind(T.railh,"mousedown",function(e){e.preventDefault()}))):(T.bind(P.hasmousecapture?T.win:l,"mouseup",T.onmouseup),T.bind(l,"mousemove",T.onmousemove),T.onclick&&T.bind(l,"click",T.onclick),T.bind(T.cursor,"mousedown",T.onmousedown),T.bind(T.cursor,"mouseup",T.onmouseup),T.railh&&(T.bind(T.cursorh,"mousedown",function(e){T.onmousedown(e,!0)}),T.bind(T.cursorh,"mouseup",T.onmouseup)),!T.ispage&&M.enablescrollonselection&&(T.bind(T.win[0],"mousedown",T.onselectionstart),T.bind(l,"mouseup",T.onselectionend),T.bind(T.cursor,"mouseup",T.onselectionend),T.cursorh&&T.bind(T.cursorh,"mouseup",T.onselectionend),T.bind(l,"mousemove",T.onselectiondrag)),T.zoom&&(T.jqbind(T.zoom,"mouseenter",function(){T.canshowonmouseevent&&T.showCursor(),T.rail.active=!0}),T.jqbind(T.zoom,"mouseleave",function(){T.rail.active=!1,T.rail.drag||T.hideCursor()}))),M.enablemousewheel&&(T.isiframe||T.mousewheel(P.isie&&T.ispage?l:T.win,T.onmousewheel),T.mousewheel(T.rail,T.onmousewheel),T.railh&&T.mousewheel(T.railh,T.onmousewheelhr)),T.ispage||P.cantouch||/HTML|^BODY/.test(T.win[0].nodeName)||(T.win.attr("tabindex")||T.win.attr({tabindex:++r}),T.bind(T.win,"focus",function(e){o=T.getTarget(e).id||T.getTarget(e)||!1,T.hasfocus=!0,T.canshowonmouseevent&&T.noticeCursor()}),T.bind(T.win,"blur",function(e){o=!1,T.hasfocus=!1}),T.bind(T.win,"mouseenter",function(e){t=T.getTarget(e).id||T.getTarget(e)||!1,T.hasmousefocus=!0,T.canshowonmouseevent&&T.noticeCursor()}),T.bind(T.win,"mouseleave",function(e){t=!1,T.hasmousefocus=!1,T.rail.drag||T.hideCursor()})),T.onkeypress=function(e){if(T.railslocked&&0===T.page.maxh)return!0;e=e||a.event;var r=T.getTarget(e);if(r&&/INPUT|TEXTAREA|SELECT|OPTION/.test(r.nodeName)&&(!(r.getAttribute("type")||r.type||!1)||!/submit|button|cancel/i.tp))return!0;if(n(r).attr("contenteditable"))return!0;if(T.hasfocus||T.hasmousefocus&&!o||T.ispage&&!o&&!t){var i=e.keyCode;if(T.railslocked&&27!=i)return T.cancelEvent(e);var s=e.ctrlKey||!1,l=e.shiftKey||!1,c=!1;switch(i){case 38:case 63233:T.doScrollBy(72),c=!0;break;case 40:case 63235:T.doScrollBy(-72),c=!0;break;case 37:case 63232:T.railh&&(s?T.doScrollLeft(0):T.doScrollLeftBy(72),c=!0);break;case 39:case 63234:T.railh&&(s?T.doScrollLeft(T.page.maxw):T.doScrollLeftBy(-72),c=!0);break;case 33:case 63276:T.doScrollBy(T.view.h),c=!0;break;case 34:case 63277:T.doScrollBy(-T.view.h),c=!0;break;case 36:case 63273:T.railh&&s?T.doScrollPos(0,0):T.doScrollTo(0),c=!0;break;case 35:case 63275:T.railh&&s?T.doScrollPos(T.page.maxw,T.page.maxh):T.doScrollTo(T.page.maxh),c=!0;break;case 32:M.spacebarenabled&&(l?T.doScrollBy(T.view.h):T.doScrollBy(-T.view.h),c=!0);break;case 27:T.zoomactive&&(T.doZoom(),c=!0)}if(c)return T.cancelEvent(e)}},M.enablekeyboard&&T.bind(l,P.isopera&&!P.isopera12?"keypress":"keydown",T.onkeypress),T.bind(l,"keydown",function(e){(e.ctrlKey||!1)&&(T.wheelprevented=!0)}),T.bind(l,"keyup",function(e){e.ctrlKey||!1||(T.wheelprevented=!1)}),T.bind(a,"blur",function(e){T.wheelprevented=!1}),T.bind(a,"resize",T.onscreenresize),T.bind(a,"orientationchange",T.onscreenresize),T.bind(a,"load",T.lazyResize),P.ischrome&&!T.ispage&&!T.haswrapper){var C=T.win.attr("style"),N=parseFloat(T.win.css("width"))+1;T.win.css("width",N),T.synched("chromefix",function(){T.win.attr("style",C)})}if(T.onAttributeChange=function(e){T.lazyResize(T.isieold?250:30)},M.enableobserver&&(T.isie11||!1===m||(T.observerbody=new m(function(e){if(e.forEach(function(e){if("attributes"==e.type)return E.hasClass("modal-open")&&E.hasClass("modal-dialog")&&!n.contains(n(".modal-dialog")[0],T.doc[0])?T.hide():T.show()}),T.me.clientWidth!=T.page.width||T.me.clientHeight!=T.page.height)return T.lazyResize(30)}),T.observerbody.observe(l.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),!T.ispage&&!T.haswrapper)){var R=T.win[0];!1!==m?(T.observer=new m(function(e){e.forEach(T.onAttributeChange)}),T.observer.observe(R,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),T.observerremover=new m(function(e){e.forEach(function(e){if(e.removedNodes.length>0)for(var o in e.removedNodes)if(T&&e.removedNodes[o]===R)return T.remove()})}),T.observerremover.observe(R.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(T.bind(R,P.isie&&!P.isie9?"propertychange":"DOMAttrModified",T.onAttributeChange),P.isie9&&R.attachEvent("onpropertychange",T.onAttributeChange),T.bind(R,"DOMNodeRemoved",function(e){e.target===R&&T.remove()}))}!T.ispage&&M.boxzoom&&T.bind(a,"resize",T.resizeZoom),T.istextarea&&(T.bind(T.win,"keydown",T.lazyResize),T.bind(T.win,"mouseup",T.lazyResize)),T.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var _=function(){T.iframexd=!1;var o;try{(o="contentDocument"in this?this.contentDocument:this.contentWindow._doc).domain}catch(e){T.iframexd=!0,o=!1}if(T.iframexd)return"console"in a&&console.log("NiceScroll error: policy restriced iframe"),!0;if(T.forcescreen=!0,T.isiframe&&(T.iframe={doc:n(o),html:T.doc.contents().find("html")[0],body:T.doc.contents().find("body")[0]},T.getContentSize=function(){return{w:Math.max(T.iframe.html.scrollWidth,T.iframe.body.scrollWidth),h:Math.max(T.iframe.html.scrollHeight,T.iframe.body.scrollHeight)}},T.docscroll=n(T.iframe.body)),!P.isios&&M.iframeautoresize&&!T.isiframe){T.win.scrollTop(0),T.doc.height("");var t=Math.max(o.getElementsByTagName("html")[0].scrollHeight,o.body.scrollHeight);T.doc.height(t)}T.lazyResize(30),T.css(n(T.iframe.body),e),P.isios&&T.haswrapper&&T.css(n(o.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?T.bind(this.contentWindow,"scroll",T.onscroll):T.bind(o,"scroll",T.onscroll),M.enablemousewheel&&T.mousewheel(o,T.onmousewheel),M.enablekeyboard&&T.bind(o,P.isopera?"keypress":"keydown",T.onkeypress),P.cantouch?(T.bind(o,"touchstart",T.ontouchstart),T.bind(o,"touchmove",T.ontouchmove)):M.emulatetouch&&(T.bind(o,"mousedown",T.ontouchstart),T.bind(o,"mousemove",function(e){return T.ontouchmove(e,!0)}),M.grabcursorenabled&&P.cursorgrabvalue&&T.css(n(o.body),{cursor:P.cursorgrabvalue})),T.bind(o,"mouseup",T.ontouchend),T.zoom&&(M.dblclickzoom&&T.bind(o,"dblclick",T.doZoom),T.ongesturezoom&&T.bind(o,"gestureend",T.ongesturezoom))};this.doc[0].readyState&&"complete"===this.doc[0].readyState&&setTimeout(function(){_.call(T.doc[0],!1)},500),T.bind(this.doc,"load",_)}},this.showCursor=function(e,o){if(T.cursortimeout&&(clearTimeout(T.cursortimeout),T.cursortimeout=0),T.rail){if(T.autohidedom&&(T.autohidedom.stop().css({opacity:M.cursoropacitymax}),T.cursoractive=!0),T.rail.drag&&1==T.rail.drag.pt||(void 0!==e&&!1!==e&&(T.scroll.y=e/T.scrollratio.y|0),void 0!==o&&(T.scroll.x=o/T.scrollratio.x|0)),T.cursor.css({height:T.cursorheight,top:T.scroll.y}),T.cursorh){var t=T.hasreversehr?T.scrollvaluemaxw-T.scroll.x:T.scroll.x;T.cursorh.css({width:T.cursorwidth,left:!T.rail.align&&T.rail.visibility?t+T.rail.width:t}),T.cursoractive=!0}T.zoom&&T.zoom.stop().css({opacity:M.cursoropacitymax})}},this.hideCursor=function(e){T.cursortimeout||T.rail&&T.autohidedom&&(T.hasmousefocus&&"leave"===M.autohidemode||(T.cursortimeout=setTimeout(function(){T.rail.active&&T.showonmouseevent||(T.autohidedom.stop().animate({opacity:M.cursoropacitymin}),T.zoom&&T.zoom.stop().animate({opacity:M.cursoropacitymin}),T.cursoractive=!1),T.cursortimeout=0},e||M.hidecursordelay)))},this.noticeCursor=function(e,o,t){T.showCursor(o,t),T.rail.active||T.hideCursor(e)},this.getContentSize=T.ispage?function(){return{w:Math.max(l.body.scrollWidth,l.documentElement.scrollWidth),h:Math.max(l.body.scrollHeight,l.documentElement.scrollHeight)}}:T.haswrapper?function(){return{w:T.doc[0].offsetWidth,h:T.doc[0].offsetHeight}}:function(){return{w:T.docscroll[0].scrollWidth,h:T.docscroll[0].scrollHeight}},this.onResize=function(e,o){if(!T||!T.win)return!1;var t=T.page.maxh,r=T.page.maxw,i=T.view.h,s=T.view.w;if(T.view={w:T.ispage?T.win.width():T.win[0].clientWidth,h:T.ispage?T.win.height():T.win[0].clientHeight},T.page=o||T.getContentSize(),T.page.maxh=Math.max(0,T.page.h-T.view.h),T.page.maxw=Math.max(0,T.page.w-T.view.w),T.page.maxh==t&&T.page.maxw==r&&T.view.w==s&&T.view.h==i){if(T.ispage)return T;var n=T.win.offset();if(T.lastposition){var l=T.lastposition;if(l.top==n.top&&l.left==n.left)return T}T.lastposition=n}return 0===T.page.maxh?(T.hideRail(),T.scrollvaluemax=0,T.scroll.y=0,T.scrollratio.y=0,T.cursorheight=0,T.setScrollTop(0),T.rail&&(T.rail.scrollable=!1)):(T.page.maxh-=M.railpadding.top+M.railpadding.bottom,T.rail.scrollable=!0),0===T.page.maxw?(T.hideRailHr(),T.scrollvaluemaxw=0,T.scroll.x=0,T.scrollratio.x=0,T.cursorwidth=0,T.setScrollLeft(0),T.railh&&(T.railh.scrollable=!1)):(T.page.maxw-=M.railpadding.left+M.railpadding.right,T.railh&&(T.railh.scrollable=M.horizrailenabled)),T.railslocked=T.locked||0===T.page.maxh&&0===T.page.maxw,T.railslocked?(T.ispage||T.updateScrollBar(T.view),!1):(T.hidden||(T.rail.visibility||T.showRail(),T.railh&&!T.railh.visibility&&T.showRailHr()),T.istextarea&&T.win.css("resize")&&"none"!=T.win.css("resize")&&(T.view.h-=20),T.cursorheight=Math.min(T.view.h,Math.round(T.view.h*(T.view.h/T.page.h))),T.cursorheight=M.cursorfixedheight?M.cursorfixedheight:Math.max(M.cursorminheight,T.cursorheight),T.cursorwidth=Math.min(T.view.w,Math.round(T.view.w*(T.view.w/T.page.w))),T.cursorwidth=M.cursorfixedheight?M.cursorfixedheight:Math.max(M.cursorminheight,T.cursorwidth),T.scrollvaluemax=T.view.h-T.cursorheight-(M.railpadding.top+M.railpadding.bottom),T.hasborderbox||(T.scrollvaluemax-=T.cursor[0].offsetHeight-T.cursor[0].clientHeight),T.railh&&(T.railh.width=T.page.maxh>0?T.view.w-T.rail.width:T.view.w,T.scrollvaluemaxw=T.railh.width-T.cursorwidth-(M.railpadding.left+M.railpadding.right)),T.ispage||T.updateScrollBar(T.view),T.scrollratio={x:T.page.maxw/T.scrollvaluemaxw,y:T.page.maxh/T.scrollvaluemax},T.getScrollTop()>T.page.maxh?T.doScrollTop(T.page.maxh):(T.scroll.y=T.getScrollTop()/T.scrollratio.y|0,T.scroll.x=T.getScrollLeft()/T.scrollratio.x|0,T.cursoractive&&T.noticeCursor()),T.scroll.y&&0===T.getScrollTop()&&T.doScrollTo(T.scroll.y*T.scrollratio.y|0),T)},this.resize=T.onResize;var O=0;this.onscreenresize=function(e){clearTimeout(O);var o=!T.ispage&&!T.haswrapper;o&&T.hideRails(),O=setTimeout(function(){T&&(o&&T.showRails(),T.resize()),O=0},120)},this.lazyResize=function(e){return clearTimeout(O),e=isNaN(e)?240:e,O=setTimeout(function(){T&&T.resize(),O=0},e),T},this.jqbind=function(e,o,t){T.events.push({e:e,n:o,f:t,q:!0}),n(e).on(o,t)},this.mousewheel=function(e,o,t){var r="jquery"in e?e[0]:e;if("onwheel"in l.createElement("div"))T._bind(r,"wheel",o,t||!1);else{var i=void 0!==l.onmousewheel?"mousewheel":"DOMMouseScroll";S(r,i,o,t||!1),"DOMMouseScroll"==i&&S(r,"MozMousePixelScroll",o,t||!1)}};var Y=!1;if(P.haseventlistener){try{var H=Object.defineProperty({},"passive",{get:function(){Y=!0}});a.addEventListener("test",null,H)}catch(e){}this.stopPropagation=function(e){return!!e&&((e=e.original?e.original:e).stopPropagation(),!1)},this.cancelEvent=function(e){return e.cancelable&&e.preventDefault(),e.stopImmediatePropagation(),e.preventManipulation&&e.preventManipulation(),!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},a.constructor.prototype.addEventListener=l.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(e,o,t){this.attachEvent("on"+e,o)},a.constructor.prototype.removeEventListener=l.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(e,o,t){this.detachEvent("on"+e,o)},this.cancelEvent=function(e){return(e=e||a.event)&&(e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1),!1},this.stopPropagation=function(e){return(e=e||a.event)&&(e.cancelBubble=!0),!1};this.delegate=function(e,o,t,r,i){var s=d[o]||!1;s||(s={a:[],l:[],f:function(e){for(var o=s.l,t=!1,r=o.length-1;r>=0;r--)if(!1===(t=o[r].call(e.target,e)))return!1;return t}},T.bind(e,o,s.f,r,i),d[o]=s),T.ispage?(s.a=[T.id].concat(s.a),s.l=[t].concat(s.l)):(s.a.push(T.id),s.l.push(t))},this.undelegate=function(e,o,t,r,i){var s=d[o]||!1;if(s&&s.l)for(var n=0,l=s.l.length;n<l;n++)s.a[n]===T.id&&(s.a.splice(n),s.l.splice(n),0===s.a.length&&(T._unbind(e,o,s.l.f),d[o]=null))},this.bind=function(e,o,t,r,i){var s="jquery"in e?e[0]:e;T._bind(s,o,t,r||!1,i||!1)},this._bind=function(e,o,t,r,i){T.events.push({e:e,n:o,f:t,b:r,q:!1}),Y&&i?e.addEventListener(o,t,{passive:!1,capture:r}):e.addEventListener(o,t,r||!1)},this._unbind=function(e,o,t,r){d[o]?T.undelegate(e,o,t,r):e.removeEventListener(o,t,r)},this.unbindAll=function(){for(var e=0;e<T.events.length;e++){var o=T.events[e];o.q?o.e.unbind(o.n,o.f):T._unbind(o.e,o.n,o.f,o.b)}},this.showRails=function(){return T.showRail().showRailHr()},this.showRail=function(){return 0===T.page.maxh||!T.ispage&&"none"==T.win.css("display")||(T.rail.visibility=!0,T.rail.css("display","block")),T},this.showRailHr=function(){return T.railh&&(0===T.page.maxw||!T.ispage&&"none"==T.win.css("display")||(T.railh.visibility=!0,T.railh.css("display","block"))),T},this.hideRails=function(){return T.hideRail().hideRailHr()},this.hideRail=function(){return T.rail.visibility=!1,T.rail.css("display","none"),T},this.hideRailHr=function(){return T.railh&&(T.railh.visibility=!1,T.railh.css("display","none")),T},this.show=function(){return T.hidden=!1,T.railslocked=!1,T.showRails()},this.hide=function(){return T.hidden=!0,T.railslocked=!0,T.hideRails()},this.toggle=function(){return T.hidden?T.show():T.hide()},this.remove=function(){T.stop(),T.cursortimeout&&clearTimeout(T.cursortimeout);for(var e in T.delaylist)T.delaylist[e]&&h(T.delaylist[e].h);T.doZoomOut(),T.unbindAll(),P.isie9&&T.win[0].detachEvent("onpropertychange",T.onAttributeChange),!1!==T.observer&&T.observer.disconnect(),!1!==T.observerremover&&T.observerremover.disconnect(),!1!==T.observerbody&&T.observerbody.disconnect(),T.events=null,T.cursor&&T.cursor.remove(),T.cursorh&&T.cursorh.remove(),T.rail&&T.rail.remove(),T.railh&&T.railh.remove(),T.zoom&&T.zoom.remove();for(var o=0;o<T.saved.css.length;o++){var t=T.saved.css[o];t[0].css(t[1],void 0===t[2]?"":t[2])}T.saved=!1,T.me.data("__nicescroll","");var r=n.nicescroll;r.each(function(e){if(this&&this.id===T.id){delete r[e];for(var o=++e;o<r.length;o++,e++)r[e]=r[o];--r.length&&delete r[r.length]}});for(var i in T)T[i]=null,delete T[i];T=null},this.scrollstart=function(e){return this.onscrollstart=e,T},this.scrollend=function(e){return this.onscrollend=e,T},this.scrollcancel=function(e){return this.onscrollcancel=e,T},this.zoomin=function(e){return this.onzoomin=e,T},this.zoomout=function(e){return this.onzoomout=e,T},this.isScrollable=function(e){var o=e.target?e.target:e;if("OPTION"==o.nodeName)return!0;for(;o&&1==o.nodeType&&o!==this.me[0]&&!/^BODY|HTML/.test(o.nodeName);){var t=n(o),r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r))return o.clientHeight!=o.scrollHeight;o=!!o.parentNode&&o.parentNode}return!1},this.getViewport=function(e){for(var o=!(!e||!e.parentNode)&&e.parentNode;o&&1==o.nodeType&&!/^BODY|HTML/.test(o.nodeName);){var t=n(o);if(/fixed|absolute/.test(t.css("position")))return t;var r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r)&&o.clientHeight!=o.scrollHeight)return t;if(t.getNiceScroll().length>0)return t;o=!!o.parentNode&&o.parentNode}return!1},this.triggerScrollStart=function(e,o,t,r,i){if(T.onscrollstart){var s={type:"scrollstart",current:{x:e,y:o},request:{x:t,y:r},end:{x:T.newscrollx,y:T.newscrolly},speed:i};T.onscrollstart.call(T,s)}},this.triggerScrollEnd=function(){if(T.onscrollend){var e=T.getScrollLeft(),o=T.getScrollTop(),t={type:"scrollend",current:{x:e,y:o},end:{x:e,y:o}};T.onscrollend.call(T,t)}};var B=0,X=0,D=0,A=1,q=!1;if(this.onmousewheel=function(e){if(T.wheelprevented||T.locked)return!1;if(T.railslocked)return T.debounced("checkunlock",T.resize,250),!1;if(T.rail.drag)return T.cancelEvent(e);if("auto"===M.oneaxismousemode&&0!==e.deltaX&&(M.oneaxismousemode=!1),M.oneaxismousemode&&0===e.deltaX&&!T.rail.scrollable)return!T.railh||!T.railh.scrollable||T.onmousewheelhr(e);var o=f(),t=!1;if(M.preservenativescrolling&&T.checkarea+600<o&&(T.nativescrollingarea=T.isScrollable(e),t=!0),T.checkarea=o,T.nativescrollingarea)return!0;var r=k(e,!1,t);return r&&(T.checkarea=0),r},this.onmousewheelhr=function(e){if(!T.wheelprevented){if(T.railslocked||!T.railh.scrollable)return!0;if(T.rail.drag)return T.cancelEvent(e);var o=f(),t=!1;return M.preservenativescrolling&&T.checkarea+600<o&&(T.nativescrollingarea=T.isScrollable(e),t=!0),T.checkarea=o,!!T.nativescrollingarea||(T.railslocked?T.cancelEvent(e):k(e,!0,t))}},this.stop=function(){return T.cancelScroll(),T.scrollmon&&T.scrollmon.stop(),T.cursorfreezed=!1,T.scroll.y=Math.round(T.getScrollTop()*(1/T.scrollratio.y)),T.noticeCursor(),T},this.getTransitionSpeed=function(e){return 80+e/72*M.scrollspeed|0},M.smoothscroll)if(T.ishwscroll&&P.hastransition&&M.usetransition&&M.smoothscroll){var j="";this.resetTransition=function(){j="",T.doc.css(P.prefixstyle+"transition-duration","0ms")},this.prepareTransition=function(e,o){var t=o?e:T.getTransitionSpeed(e),r=t+"ms";return j!==r&&(j=r,T.doc.css(P.prefixstyle+"transition-duration",r)),t},this.doScrollLeft=function(e,o){var t=T.scrollrunning?T.newscrolly:T.getScrollTop();T.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=T.scrollrunning?T.newscrollx:T.getScrollLeft();T.doScrollPos(t,e,o)},this.cursorupdate={running:!1,start:function(){var e=this;if(!e.running){e.running=!0;var o=function(){e.running&&u(o),T.showCursor(T.getScrollTop(),T.getScrollLeft()),T.notifyScrollEvent(T.win[0])};u(o)}},stop:function(){this.running=!1}},this.doScrollPos=function(e,o,t){var r=T.getScrollTop(),i=T.getScrollLeft();if(((T.newscrolly-r)*(o-r)<0||(T.newscrollx-i)*(e-i)<0)&&T.cancelScroll(),M.bouncescroll?(o<0?o=o/2|0:o>T.page.maxh&&(o=T.page.maxh+(o-T.page.maxh)/2|0),e<0?e=e/2|0:e>T.page.maxw&&(e=T.page.maxw+(e-T.page.maxw)/2|0)):(o<0?o=0:o>T.page.maxh&&(o=T.page.maxh),e<0?e=0:e>T.page.maxw&&(e=T.page.maxw)),T.scrollrunning&&e==T.newscrollx&&o==T.newscrolly)return!1;T.newscrolly=o,T.newscrollx=e;var s=T.getScrollTop(),n=T.getScrollLeft(),l={};l.x=e-n,l.y=o-s;var a=0|Math.sqrt(l.x*l.x+l.y*l.y),c=T.prepareTransition(a);T.scrollrunning||(T.scrollrunning=!0,T.triggerScrollStart(n,s,e,o,c),T.cursorupdate.start()),T.scrollendtrapped=!0,P.transitionend||(T.scrollendtrapped&&clearTimeout(T.scrollendtrapped),T.scrollendtrapped=setTimeout(T.onScrollTransitionEnd,c)),T.setScrollTop(T.newscrolly),T.setScrollLeft(T.newscrollx)},this.cancelScroll=function(){if(!T.scrollendtrapped)return!0;var e=T.getScrollTop(),o=T.getScrollLeft();return T.scrollrunning=!1,P.transitionend||clearTimeout(P.transitionend),T.scrollendtrapped=!1,T.resetTransition(),T.setScrollTop(e),T.railh&&T.setScrollLeft(o),T.timerscroll&&T.timerscroll.tm&&clearInterval(T.timerscroll.tm),T.timerscroll=!1,T.cursorfreezed=!1,T.cursorupdate.stop(),T.showCursor(e,o),T},this.onScrollTransitionEnd=function(){if(T.scrollendtrapped){var e=T.getScrollTop(),o=T.getScrollLeft();if(e<0?e=0:e>T.page.maxh&&(e=T.page.maxh),o<0?o=0:o>T.page.maxw&&(o=T.page.maxw),e!=T.newscrolly||o!=T.newscrollx)return T.doScrollPos(o,e,M.snapbackspeed);T.scrollrunning&&T.triggerScrollEnd(),T.scrollrunning=!1,T.scrollendtrapped=!1,T.resetTransition(),T.timerscroll=!1,T.setScrollTop(e),T.railh&&T.setScrollLeft(o),T.cursorupdate.stop(),T.noticeCursor(!1,e,o),T.cursorfreezed=!1}}}else this.doScrollLeft=function(e,o){var t=T.scrollrunning?T.newscrolly:T.getScrollTop();T.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=T.scrollrunning?T.newscrollx:T.getScrollLeft();T.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=T.getScrollTop(),i=T.getScrollLeft();((T.newscrolly-r)*(o-r)<0||(T.newscrollx-i)*(e-i)<0)&&T.cancelScroll();var s=!1;if(T.bouncescroll&&T.rail.visibility||(o<0?(o=0,s=!0):o>T.page.maxh&&(o=T.page.maxh,s=!0)),T.bouncescroll&&T.railh.visibility||(e<0?(e=0,s=!0):e>T.page.maxw&&(e=T.page.maxw,s=!0)),T.scrollrunning&&T.newscrolly===o&&T.newscrollx===e)return!0;T.newscrolly=o,T.newscrollx=e,T.dst={},T.dst.x=e-i,T.dst.y=o-r,T.dst.px=i,T.dst.py=r;var n=0|Math.sqrt(T.dst.x*T.dst.x+T.dst.y*T.dst.y),l=T.getTransitionSpeed(n);T.bzscroll={};var a=s?1:.58;T.bzscroll.x=new R(i,T.newscrollx,l,0,0,a,1),T.bzscroll.y=new R(r,T.newscrolly,l,0,0,a,1);f();var c=function(){if(T.scrollrunning){var e=T.bzscroll.y.getPos();T.setScrollLeft(T.bzscroll.x.getNow()),T.setScrollTop(T.bzscroll.y.getNow()),e<=1?T.timer=u(c):(T.scrollrunning=!1,T.timer=0,T.triggerScrollEnd())}};T.scrollrunning||(T.triggerScrollStart(i,r,e,o,l),T.scrollrunning=!0,T.timer=u(c))},this.cancelScroll=function(){return T.timer&&h(T.timer),T.timer=0,T.bzscroll=!1,T.scrollrunning=!1,T};else this.doScrollLeft=function(e,o){var t=T.getScrollTop();T.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=T.getScrollLeft();T.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=e>T.page.maxw?T.page.maxw:e;r<0&&(r=0);var i=o>T.page.maxh?T.page.maxh:o;i<0&&(i=0),T.synched("scroll",function(){T.setScrollTop(i),T.setScrollLeft(r)})},this.cancelScroll=function(){};this.doScrollBy=function(e,o){z(0,e)},this.doScrollLeftBy=function(e,o){z(e,0)},this.doScrollTo=function(e,o){var t=o?Math.round(e*T.scrollratio.y):e;t<0?t=0:t>T.page.maxh&&(t=T.page.maxh),T.cursorfreezed=!1,T.doScrollTop(e)},this.checkContentSize=function(){var e=T.getContentSize();e.h==T.page.h&&e.w==T.page.w||T.resize(!1,e)},T.onscroll=function(e){T.rail.drag||T.cursorfreezed||T.synched("scroll",function(){T.scroll.y=Math.round(T.getScrollTop()/T.scrollratio.y),T.railh&&(T.scroll.x=Math.round(T.getScrollLeft()/T.scrollratio.x)),T.noticeCursor()})},T.bind(T.docscroll,"scroll",T.onscroll),this.doZoomIn=function(e){if(!T.zoomactive){T.zoomactive=!0,T.zoomrestore={style:{}};var o=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],t=T.win[0].style;for(var r in o){var i=o[r];T.zoomrestore.style[i]=void 0!==t[i]?t[i]:""}T.zoomrestore.style.width=T.win.css("width"),T.zoomrestore.style.height=T.win.css("height"),T.zoomrestore.padding={w:T.win.outerWidth()-T.win.width(),h:T.win.outerHeight()-T.win.height()},P.isios4&&(T.zoomrestore.scrollTop=c.scrollTop(),c.scrollTop(0)),T.win.css({position:P.isios4?"absolute":"fixed",top:0,left:0,zIndex:s+100,margin:0});var n=T.win.css("backgroundColor");return(""===n||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(n))&&T.win.css("backgroundColor","#fff"),T.rail.css({zIndex:s+101}),T.zoom.css({zIndex:s+102}),T.zoom.css("backgroundPosition","0 -18px"),T.resizeZoom(),T.onzoomin&&T.onzoomin.call(T),T.cancelEvent(e)}},this.doZoomOut=function(e){if(T.zoomactive)return T.zoomactive=!1,T.win.css("margin",""),T.win.css(T.zoomrestore.style),P.isios4&&c.scrollTop(T.zoomrestore.scrollTop),T.rail.css({"z-index":T.zindex}),T.zoom.css({"z-index":T.zindex}),T.zoomrestore=!1,T.zoom.css("backgroundPosition","0 0"),T.onResize(),T.onzoomout&&T.onzoomout.call(T),T.cancelEvent(e)},this.doZoom=function(e){return T.zoomactive?T.doZoomOut(e):T.doZoomIn(e)},this.resizeZoom=function(){if(T.zoomactive){var e=T.getScrollTop();T.win.css({width:c.width()-T.zoomrestore.padding.w+"px",height:c.height()-T.zoomrestore.padding.h+"px"}),T.onResize(),T.setScrollTop(Math.min(T.page.maxh,e))}},this.init(),n.nicescroll.push(this)},y=function(e){var o=this;this.nc=e,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.reset=function(e,t){o.stop(),o.steptime=0,o.lasttime=f(),o.speedx=0,o.speedy=0,o.lastx=e,o.lasty=t,o.lastscrollx=-1,o.lastscrolly=-1},this.update=function(e,t){var r=f();o.steptime=r-o.lasttime,o.lasttime=r;var i=t-o.lasty,s=e-o.lastx,n=o.nc.getScrollTop()+i,l=o.nc.getScrollLeft()+s;o.snapx=l<0||l>o.nc.page.maxw,o.snapy=n<0||n>o.nc.page.maxh,o.speedx=s,o.speedy=i,o.lastx=e,o.lasty=t},this.stop=function(){o.nc.unsynched("domomentum2d"),o.timer&&clearTimeout(o.timer),o.timer=0,o.lastscrollx=-1,o.lastscrolly=-1},this.doSnapy=function(e,t){var r=!1;t<0?(t=0,r=!0):t>o.nc.page.maxh&&(t=o.nc.page.maxh,r=!0),e<0?(e=0,r=!0):e>o.nc.page.maxw&&(e=o.nc.page.maxw,r=!0),r?o.nc.doScrollPos(e,t,o.nc.opt.snapbackspeed):o.nc.triggerScrollEnd()},this.doMomentum=function(e){var t=f(),r=e?t+e:o.lasttime,i=o.nc.getScrollLeft(),s=o.nc.getScrollTop(),n=o.nc.page.maxh,l=o.nc.page.maxw;o.speedx=l>0?Math.min(60,o.speedx):0,o.speedy=n>0?Math.min(60,o.speedy):0;var a=r&&t-r<=60;(s<0||s>n||i<0||i>l)&&(a=!1);var c=!(!o.speedy||!a)&&o.speedy,d=!(!o.speedx||!a)&&o.speedx;if(c||d){var u=Math.max(16,o.steptime);if(u>50){var h=u/50;o.speedx*=h,o.speedy*=h,u=50}o.demulxy=0,o.lastscrollx=o.nc.getScrollLeft(),o.chkx=o.lastscrollx,o.lastscrolly=o.nc.getScrollTop(),o.chky=o.lastscrolly;var p=o.lastscrollx,m=o.lastscrolly,g=function(){var e=f()-t>600?.04:.02;o.speedx&&(p=Math.floor(o.lastscrollx-o.speedx*(1-o.demulxy)),o.lastscrollx=p,(p<0||p>l)&&(e=.1)),o.speedy&&(m=Math.floor(o.lastscrolly-o.speedy*(1-o.demulxy)),o.lastscrolly=m,(m<0||m>n)&&(e=.1)),o.demulxy=Math.min(1,o.demulxy+e),o.nc.synched("domomentum2d",function(){if(o.speedx){o.nc.getScrollLeft();o.chkx=p,o.nc.setScrollLeft(p)}if(o.speedy){o.nc.getScrollTop();o.chky=m,o.nc.setScrollTop(m)}o.timer||(o.nc.hideCursor(),o.doSnapy(p,m))}),o.demulxy<1?o.timer=setTimeout(g,u):(o.stop(),o.nc.hideCursor(),o.doSnapy(p,m))};g()}else o.doSnapy(o.nc.getScrollLeft(),o.nc.getScrollTop())}},x=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(e,o,t){var r=n.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollTop():x.call(e)},set:function(e,o){var t=n.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollTop(parseInt(o)):x.call(e,o),this}},e.fn.scrollTop=function(e){if(void 0===e){var o=!!this[0]&&(n.data(this[0],"__nicescroll")||!1);return o&&o.ishwscroll?o.getScrollTop():x.call(this)}return this.each(function(){var o=n.data(this,"__nicescroll")||!1;o&&o.ishwscroll?o.setScrollTop(parseInt(e)):x.call(n(this),e)})};var S=e.fn.scrollLeft;n.cssHooks.pageXOffset={get:function(e,o,t){var r=n.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollLeft():S.call(e)},set:function(e,o){var t=n.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollLeft(parseInt(o)):S.call(e,o),this}},e.fn.scrollLeft=function(e){if(void 0===e){var o=!!this[0]&&(n.data(this[0],"__nicescroll")||!1);return o&&o.ishwscroll?o.getScrollLeft():S.call(this)}return this.each(function(){var o=n.data(this,"__nicescroll")||!1;o&&o.ishwscroll?o.setScrollLeft(parseInt(e)):S.call(n(this),e)})};var z=function(e){var o=this;if(this.length=0,this.name="nicescrollarray",this.each=function(e){return n.each(o,e),o},this.push=function(e){o[o.length]=e,o.length++},this.eq=function(e){return o[e]},e)for(var t=0;t<e.length;t++){var r=n.data(e[t],"__nicescroll")||!1;r&&(this[this.length]=r,this.length++)}return this};!function(e,o,t){for(var r=0,i=o.length;r<i;r++)t(e,o[r])}(z.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(e,o){e[o]=function(){var e=arguments;return this.each(function(){this[o].apply(this,e)})}}),e.fn.getNiceScroll=function(e){return void 0===e?new z(this):this[e]&&n.data(this[e],"__nicescroll")||!1},(e.expr.pseudos||e.expr[":"]).nicescroll=function(e){return void 0!==n.data(e,"__nicescroll")},n.fn.niceScroll=function(e,o){void 0!==o||"object"!=typeof e||"jquery"in e||(o=e,e=!1);var t=new z;return this.each(function(){var r=n(this),i=n.extend({},o);if(e){var s=n(e);i.doc=s.length>1?n(e,r):s,i.win=r}!("doc"in i)||"win"in i||(i.win=r);var l=r.data("__nicescroll")||!1;l||(i.doc=i.doc||r,l=new b(i,r),r.data("__nicescroll",l)),t.push(l)}),1===t.length?t[0]:t},a.NiceScroll={getjQuery:function(){return e}},n.nicescroll||(n.nicescroll=new z,n.nicescroll.options=g)});
1
  /* jquery.nicescroll v3.7.6 InuYaksa - MIT - https://nicescroll.areaaperta.com */
2
+ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";var T=!1,E=!1,L=0,M=2e3,C=0,P=e,N=document,R=window,_=P(R),I=[];var s,O=R.requestAnimationFrame||R.webkitRequestAnimationFrame||R.mozRequestAnimationFrame||!1,Y=R.cancelAnimationFrame||R.webkitCancelAnimationFrame||R.mozCancelAnimationFrame||!1;O?R.cancelAnimationFrame||(Y=function(e){}):(s=0,O=function(e,o){var t=(new Date).getTime(),r=Math.max(0,16-(t-s)),i=R.setTimeout(function(){e(t+r)},r);return s=t+r,i},Y=function(e){R.clearTimeout(e)});function H(){if(r)return r;var e=N.createElement("DIV"),s=e.style,o=navigator.userAgent,t=navigator.platform,n={};return n.haspointerlock="pointerLockElement"in N||"webkitPointerLockElement"in N||"mozPointerLockElement"in N,n.isopera="opera"in R,n.isopera12=n.isopera&&"getUserMedia"in navigator,n.isoperamini="[object OperaMini]"===Object.prototype.toString.call(R.operamini),n.isie="all"in N&&"attachEvent"in e&&!n.isopera,n.isieold=n.isie&&!("msInterpolationMode"in s),n.isie7=n.isie&&!n.isieold&&(!("documentMode"in N)||7===N.documentMode),n.isie8=n.isie&&"documentMode"in N&&8===N.documentMode,n.isie9=n.isie&&"performance"in R&&9===N.documentMode,n.isie10=n.isie&&"performance"in R&&10===N.documentMode,n.isie11="msRequestFullscreen"in e&&11<=N.documentMode,n.ismsedge="msCredentials"in R,n.ismozilla="MozAppearance"in s,n.iswebkit=!n.ismsedge&&"WebkitAppearance"in s,n.ischrome=n.iswebkit&&"chrome"in R,n.ischrome38=n.ischrome&&"touchAction"in s,n.ischrome22=!n.ischrome38&&n.ischrome&&n.haspointerlock,n.ischrome26=!n.ischrome38&&n.ischrome&&"transition"in s,n.cantouch="ontouchstart"in N.documentElement||"ontouchstart"in R,n.hasw3ctouch=!!R.PointerEvent&&(0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints),n.hasmstouch=!n.hasw3ctouch&&(R.MSPointerEvent||!1),n.ismac=/^mac$/i.test(t),n.isios=n.cantouch&&/iphone|ipad|ipod/i.test(t),n.isios4=n.isios&&!("seal"in Object),n.isios7=n.isios&&"webkitHidden"in N,n.isios8=n.isios&&"hidden"in N,n.isios10=n.isios&&R.Proxy,n.isandroid=/android/i.test(o),n.haseventlistener="addEventListener"in e,n.trstyle=!1,n.hastransform=!1,n.hastranslate3d=!1,n.transitionstyle=!1,n.hastransition=!1,n.transitionend=!1,n.trstyle="transform",n.hastransform="transform"in s||function(){for(var e=["msTransform","webkitTransform","MozTransform","OTransform"],o=0,t=e.length;o<t;o++)if(void 0!==s[e[o]]){n.trstyle=e[o];break}n.hastransform=!!n.trstyle}(),n.hastransform&&(s[n.trstyle]="translate3d(1px,2px,3px)",n.hastranslate3d=/translate3d/.test(s[n.trstyle])),n.transitionstyle="transition",n.prefixstyle="",n.transitionend="transitionend",n.hastransition="transition"in s||function(){n.transitionend=!1;for(var e=["webkitTransition","msTransition","MozTransition","OTransition","OTransition","KhtmlTransition"],o=["-webkit-","-ms-","-moz-","-o-","-o","-khtml-"],t=["webkitTransitionEnd","msTransitionEnd","transitionend","otransitionend","oTransitionEnd","KhtmlTransitionEnd"],r=0,i=e.length;r<i;r++)if(e[r]in s){n.transitionstyle=e[r],n.prefixstyle=o[r],n.transitionend=t[r];break}n.ischrome26&&(n.prefixstyle=o[1]),n.hastransition=n.transitionstyle}(),n.cursorgrabvalue=function(){var e=["grab","-webkit-grab","-moz-grab"];(n.ischrome&&!n.ischrome38||n.isie)&&(e=[]);for(var o=0,t=e.length;o<t;o++){var r=e[o];if(s.cursor=r,s.cursor==r)return r}return"url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize"}(),n.hasmousecapture="setCapture"in e,n.hasMutationObserver=!1!==B,e=null,r=n}function n(e,o){var v=this;this.version="3.7.6",this.name="nicescroll",this.me=o;var t,w=P("body"),b=this.opt={doc:w,win:!1};if(P.extend(b,D),b.snapbackspeed=80,e)for(var r in b)void 0!==e[r]&&(b[r]=e[r]);if(b.disablemutationobserver&&(B=!1),this.doc=b.doc,this.iddoc=this.doc&&this.doc[0]&&this.doc[0].id||"",this.ispage=/^BODY|HTML/.test((b.win||this.doc)[0].nodeName),this.haswrapper=!1!==b.win,this.win=b.win||(this.ispage?_:this.doc),this.docscroll=this.ispage&&!this.haswrapper?_:this.win,this.body=w,this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=b.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,"auto"==b.rtlmode?"horizontal-tb"==(o=(t=this.win[0]==R?this.body:this.win).css("writing-mode")||t.css("-webkit-writing-mode")||t.css("-ms-writing-mode")||t.css("-moz-writing-mode"))||"lr-tb"==o||""===o?(this.isrtlmode="rtl"==t.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==o||"tb"==o||"tb-rl"==o||"rl-tb"==o,this.isvertical="vertical-rl"==o||"tb"==o||"tb-rl"==o):(this.isrtlmode=!0===b.rtlmode,this.isvertical=!1),this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,(this.observerbody=!1)!==b.scrollbarid)this.id=b.scrollbarid;else for(;this.id="ascrail"+M++,N.getElementById(this.id););this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=b.overflowx,this.overflowy=b.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=H();var i,y=P.extend({},this.detected);function a(e,o,t,r,i,s,n){this.st=e,this.ed=o,this.spd=t,this.p1=r||0,this.p2=i||1,this.p3=s||0,this.p4=n||1,this.ts=X(),this.df=o-e}function s(){var e=v.doc.css(y.trstyle);return!(!e||"matrix"!=e.substr(0,6))&&e.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}this.canhwscroll=y.hastransform&&b.hwacceleration,this.ishwscroll=this.canhwscroll&&v.haswrapper,this.isrtlmode?this.isvertical?this.hasreversehr=!(y.iswebkit||y.isie||y.isie11):this.hasreversehr=!(y.iswebkit||y.isie&&!y.isie10&&!y.isie11):this.hasreversehr=!1,this.istouchcapable=!1,(y.cantouch||!y.hasw3ctouch&&!y.hasmstouch)&&(!y.cantouch||y.isios||y.isandroid||!y.iswebkit&&!y.ismozilla)||(this.istouchcapable=!0),b.enablemouselockapi||(y.hasmousecapture=!1,y.haspointerlock=!1),this.debounced=function(e,o,t){v&&(v.delaylist[e]||!1||(v.delaylist[e]={h:O(function(){v.delaylist[e].fn.call(v),v.delaylist[e]=!1},t)},o.call(v)),v.delaylist[e].fn=o)},this.synched=function(e,o){v.synclist[e]?v.synclist[e]=o:(v.synclist[e]=o,O(function(){v&&(v.synclist[e]&&v.synclist[e].call(v),v.synclist[e]=null)}))},this.unsynched=function(e){v.synclist[e]&&(v.synclist[e]=!1)},this.css=function(e,o){for(var t in o)v.saved.css.push([e,t,e.css(t)]),e.css(t,o[t])},this.scrollTop=function(e){return void 0===e?v.getScrollTop():v.setScrollTop(e)},this.scrollLeft=function(e){return void 0===e?v.getScrollLeft():v.setScrollLeft(e)},a.prototype={B2:function(e){return 3*(1-e)*(1-e)*e},B3:function(e){return 3*(1-e)*e*e},B4:function(e){return e*e*e},getPos:function(){return(X()-this.ts)/this.spd},getNow:function(){var e=(X()-this.ts)/this.spd,o=this.B2(e)+this.B3(e)+this.B4(e);return 1<=e?this.ed:this.st+this.df*o|0},update:function(e,o){return this.st=this.getNow(),this.ed=e,this.spd=o,this.ts=X(),this.df=this.ed-this.st,this}},this.ishwscroll?(this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},y.hastranslate3d&&y.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(e){if(!e){e=s();if(e)return 16==e.length?-e[13]:-e[5];if(v.timerscroll&&v.timerscroll.bz)return v.timerscroll.bz.getNow()}return v.doc.translate.y},this.getScrollLeft=function(e){if(!e){e=s();if(e)return 16==e.length?-e[12]:-e[4];if(v.timerscroll&&v.timerscroll.bh)return v.timerscroll.bh.getNow()}return v.doc.translate.x},this.notifyScrollEvent=function(e){var o=N.createEvent("UIEvents");o.initUIEvent("scroll",!1,!1,R,1),o.niceevent=!0,e.dispatchEvent(o)},i=this.isrtlmode?1:-1,y.hastranslate3d&&b.enabletranslate3d?(this.setScrollTop=function(e,o){v.doc.translate.y=e,v.doc.translate.ty=-1*e+"px",v.doc.css(y.trstyle,"translate3d("+v.doc.translate.tx+","+v.doc.translate.ty+",0)"),o||v.notifyScrollEvent(v.win[0])},this.setScrollLeft=function(e,o){v.doc.translate.x=e,v.doc.translate.tx=e*i+"px",v.doc.css(y.trstyle,"translate3d("+v.doc.translate.tx+","+v.doc.translate.ty+",0)"),o||v.notifyScrollEvent(v.win[0])}):(this.setScrollTop=function(e,o){v.doc.translate.y=e,v.doc.translate.ty=-1*e+"px",v.doc.css(y.trstyle,"translate("+v.doc.translate.tx+","+v.doc.translate.ty+")"),o||v.notifyScrollEvent(v.win[0])},this.setScrollLeft=function(e,o){v.doc.translate.x=e,v.doc.translate.tx=e*i+"px",v.doc.css(y.trstyle,"translate("+v.doc.translate.tx+","+v.doc.translate.ty+")"),o||v.notifyScrollEvent(v.win[0])})):(this.getScrollTop=function(){return v.docscroll.scrollTop()},this.setScrollTop=function(e){v.docscroll.scrollTop(e)},this.getScrollLeft=function(){var e=v.hasreversehr?v.detected.ismozilla?v.page.maxw-Math.abs(v.docscroll.scrollLeft()):v.page.maxw-v.docscroll.scrollLeft():v.docscroll.scrollLeft();return e},this.setScrollLeft=function(e){return setTimeout(function(){if(v)return v.hasreversehr&&(e=v.detected.ismozilla?-(v.page.maxw-e):v.page.maxw-e),v.docscroll.scrollLeft(e)},1)}),this.getTarget=function(e){return e&&(e.target||e.srcElement)||!1},this.hasParent=function(e,o){if(!e)return!1;for(var t=e.target||e.srcElement||e||!1;t&&t.id!=o;)t=t.parentNode||!1;return!1!==t};var n={thin:1,medium:3,thick:5};function l(e,o,t){e=e.css(o),o=parseFloat(e);if(isNaN(o)){t=3==(o=n[e]||0)?t?v.win.outerHeight()-v.win.innerHeight():v.win.outerWidth()-v.win.innerWidth():1;return v.isie8&&o&&(o+=1),t?o:0}return o}this.getDocumentScrollOffset=function(){return{top:R.pageYOffset||N.documentElement.scrollTop,left:R.pageXOffset||N.documentElement.scrollLeft}},this.getOffset=function(){if(v.isfixed){var e=v.win.offset(),o=v.getDocumentScrollOffset();return e.top-=o.top,e.left-=o.left,e}o=v.win.offset();if(!v.viewport)return o;e=v.viewport.offset();return{top:o.top-e.top,left:o.left-e.left}},this.updateScrollBar=function(e){var o,t,r;v.ishwscroll?(v.rail.css({height:v.win.innerHeight()-(b.railpadding.top+b.railpadding.bottom)}),v.railh&&v.railh.css({width:v.win.innerWidth()-(b.railpadding.left+b.railpadding.right)})):((r={top:(o=v.getOffset()).top,left:o.left-(b.railpadding.left+b.railpadding.right)}).top+=l(v.win,"border-top-width",!0),r.left+=v.rail.align?v.win.outerWidth()-l(v.win,"border-right-width")-v.rail.width:l(v.win,"border-left-width"),(t=b.railoffset)&&(t.top&&(r.top+=t.top),t.left&&(r.left+=t.left)),v.railslocked||v.rail.css({top:r.top,left:r.left,height:(e?e.h:v.win.innerHeight())-(b.railpadding.top+b.railpadding.bottom)}),v.zoom&&v.zoom.css({top:r.top+1,left:1==v.rail.align?r.left-20:r.left+v.rail.width+4}),v.railh&&!v.railslocked&&(r={top:o.top,left:o.left},(t=b.railhoffset)&&(t.top&&(r.top+=t.top),t.left&&(r.left+=t.left)),t=v.railh.align?r.top+l(v.win,"border-top-width",!0)+v.win.innerHeight()-v.railh.height:r.top+l(v.win,"border-top-width",!0),r=r.left+l(v.win,"border-left-width"),v.railh.css({top:t-(b.railpadding.top+b.railpadding.bottom),left:r,width:v.railh.width})))},this.doRailClick=function(e,o,t){var r,i;v.railslocked||(v.cancelEvent(e),"pageY"in e||(e.pageX=e.clientX+N.documentElement.scrollLeft,e.pageY=e.clientY+N.documentElement.scrollTop),o?(r=t?v.doScrollLeft:v.doScrollTop,i=t?(e.pageX-v.railh.offset().left-v.cursorwidth/2)*v.scrollratio.x:(e.pageY-v.rail.offset().top-v.cursorheight/2)*v.scrollratio.y,v.unsynched("relativexy"),r(0|i)):(r=t?v.doScrollLeftBy:v.doScrollBy,i=t?v.scroll.x:v.scroll.y,e=t?e.pageX-v.railh.offset().left:e.pageY-v.rail.offset().top,t=t?v.view.w:v.view.h,r(e<=i?t:-t)))},v.newscrolly=v.newscrollx=0,v.hasanimationframe="requestAnimationFrame"in R,v.hascancelanimationframe="cancelAnimationFrame"in R,v.hasborderbox=!1,this.init=function(){if(v.saved.css=[],y.isoperamini)return!0;if(y.isandroid&&!("hidden"in N))return!0;b.emulatetouch=b.emulatetouch||b.touchbehavior,v.hasborderbox=R.getComputedStyle&&"border-box"===R.getComputedStyle(N.body)["box-sizing"];var e,t={"overflow-y":"hidden"};if((y.isie11||y.isie10)&&(t["-ms-overflow-style"]="none"),v.ishwscroll&&(this.doc.css(y.transitionstyle,y.prefixstyle+"transform 0ms ease-out"),y.transitionend&&v.bind(v.doc,y.transitionend,v.onScrollTransitionEnd,!1)),v.zindex="auto",v.ispage||"auto"!=b.zindex?v.zindex=b.zindex:v.zindex=function(){var e=v.win;if("zIndex"in e)return e.zIndex();for(;0<e.length;){if(9==e[0].nodeType)return!1;var o=e.css("zIndex");if(!isNaN(o)&&0!==o)return parseInt(o);e=e.parent()}return!1}()||"auto",!v.ispage&&"auto"!=v.zindex&&v.zindex>C&&(C=v.zindex),v.isie&&0===v.zindex&&"auto"==b.zindex&&(v.zindex="auto"),!v.ispage||!y.isieold){var o=v.docscroll;v.ispage&&(o=v.haswrapper?v.win:v.doc),v.css(o,t),v.ispage&&(y.isie11||y.isie)&&v.css(P("html"),t),!y.isios||v.ispage||v.haswrapper||v.css(w,{"-webkit-overflow-scrolling":"touch"});var r=P(N.createElement("div"));r.css({position:"relative",top:0,float:"right",width:b.cursorwidth,height:0,"background-color":b.cursorcolor,border:b.cursorborder,"background-clip":"padding-box","-webkit-border-radius":b.cursorborderradius,"-moz-border-radius":b.cursorborderradius,"border-radius":b.cursorborderradius}),r.addClass("nicescroll-cursors"),v.cursor=r;var i=P(N.createElement("div"));i.attr("id",v.id),i.addClass("nicescroll-rails nicescroll-rails-vr"),b.scrollCLass&&i.addClass(b.scrollCLass);var s,n,l,a=["left","right","top","bottom"];for(l in a)n=a[l],(s=b.railpadding[n]||0)&&i.css("padding-"+n,s+"px");i.append(r),i.width=Math.max(parseFloat(b.cursorwidth),r.outerWidth()),i.css({width:i.width+"px",zIndex:v.zindex,background:b.background,cursor:"default"}),i.visibility=!0,i.scrollable=!0,i.align="left"==b.railalign?0:1,v.rail=i;var c,d,u,h,p,m,f,g=v.rail.drag=!1;!b.boxzoom||v.ispage||y.isieold||(g=N.createElement("div"),v.bind(g,"click",v.doZoom),v.bind(g,"mouseenter",function(){v.zoom.css("opacity",b.cursoropacitymax)}),v.bind(g,"mouseleave",function(){v.zoom.css("opacity",b.cursoropacitymin)}),v.zoom=P(g),v.zoom.css({cursor:"pointer",zIndex:v.zindex,backgroundImage:"url("+b.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),b.dblclickzoom&&v.bind(v.win,"dblclick",v.doZoom),y.cantouch&&b.gesturezoom&&(v.ongesturezoom=function(e){return 1.5<e.scale&&v.doZoomIn(e),e.scale<.8&&v.doZoomOut(e),v.cancelEvent(e)},v.bind(v.win,"gestureend",v.ongesturezoom))),v.railh=!1,b.horizrailenabled&&(v.css(o,{overflowX:"hidden"}),(r=P(N.createElement("div"))).css({position:"absolute",top:0,height:b.cursorwidth,width:0,backgroundColor:b.cursorcolor,border:b.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":b.cursorborderradius,"-moz-border-radius":b.cursorborderradius,"border-radius":b.cursorborderradius}),y.isieold&&r.css("overflow","hidden"),r.addClass("nicescroll-cursors"),v.cursorh=r,(m=P(N.createElement("div"))).attr("id",v.id+"-hr"),m.addClass("nicescroll-rails nicescroll-rails-hr"),b.scrollCLass&&m.addClass(b.scrollCLass),m.height=Math.max(parseFloat(b.cursorwidth),r.outerHeight()),m.css({height:m.height+"px",zIndex:v.zindex,background:b.background}),m.append(r),m.visibility=!0,m.scrollable=!0,m.align="top"==b.railvalign?0:1,v.railh=m,v.railh.drag=!1),v.ispage?(i.css({position:"fixed",top:0,height:"100%"}),i.css(i.align?{right:0}:{left:0}),v.body.append(i),v.railh&&(m.css({position:"fixed",left:0,width:"100%"}),m.css(m.align?{bottom:0}:{top:0}),v.body.append(m))):(v.ishwscroll?("static"==v.win.css("position")&&v.css(v.win,{position:"relative"}),c="HTML"==v.win[0].nodeName?v.body:v.win,P(c).scrollTop(0).scrollLeft(0),v.zoom&&(v.zoom.css({position:"absolute",top:1,right:0,"margin-right":i.width+4}),c.append(v.zoom)),i.css({position:"absolute",top:0}),i.css(i.align?{right:0}:{left:0}),c.append(i),m&&(m.css({position:"absolute",left:0,bottom:0}),m.css(m.align?{bottom:0}:{top:0}),c.append(m))):(v.isfixed="fixed"==v.win.css("position"),c=v.isfixed?"fixed":"absolute",v.isfixed||(v.viewport=v.getViewport(v.win[0])),v.viewport&&(v.body=v.viewport,/fixed|absolute/.test(v.viewport.css("position"))||v.css(v.viewport,{position:"relative"})),i.css({position:c}),v.zoom&&v.zoom.css({position:c}),v.updateScrollBar(),v.body.append(i),v.zoom&&v.body.append(v.zoom),v.railh&&(m.css({position:c}),v.body.append(m))),y.isios&&v.css(v.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),b.disableoutline&&(y.isie&&v.win.attr("hideFocus","true"),y.iswebkit&&v.win.css("outline","none"))),!1===b.autohidemode?(v.autohidedom=!1,v.rail.css({opacity:b.cursoropacitymax}),v.railh&&v.railh.css({opacity:b.cursoropacitymax})):!0===b.autohidemode||"leave"===b.autohidemode?(v.autohidedom=P().add(v.rail),y.isie8&&(v.autohidedom=v.autohidedom.add(v.cursor)),v.railh&&(v.autohidedom=v.autohidedom.add(v.railh)),v.railh&&y.isie8&&(v.autohidedom=v.autohidedom.add(v.cursorh))):"scroll"==b.autohidemode?(v.autohidedom=P().add(v.rail),v.railh&&(v.autohidedom=v.autohidedom.add(v.railh))):"cursor"==b.autohidemode?(v.autohidedom=P().add(v.cursor),v.railh&&(v.autohidedom=v.autohidedom.add(v.cursorh))):"hidden"==b.autohidemode&&(v.autohidedom=!1,v.hide(),v.railslocked=!1),(y.cantouch||v.istouchcapable||b.emulatetouch||y.hasmstouch)&&(v.scrollmom=new A(v),v.ontouchstart=function(e){if(v.locked)return!1;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;if(v.hasmoving=!1,v.scrollmom.timer&&(v.triggerScrollEnd(),v.scrollmom.stop()),!v.railslocked){var o=v.getTarget(e);if(o)if(/INPUT/i.test(o.nodeName)&&/range/i.test(o.type))return v.stopPropagation(e);var t,r,i,s="mousedown"===e.type;if(!("clientX"in e)&&"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),v.forcescreen&&((e={original:(t=e).original||e}).clientX=t.screenX,e.clientY=t.screenY),v.rail.drag={x:e.clientX,y:e.clientY,sx:v.scroll.x,sy:v.scroll.y,st:v.getScrollTop(),sl:v.getScrollLeft(),pt:2,dl:!1,tg:o},v.ispage||!b.directionlockdeadzone?v.rail.drag.dl="f":(i=_.width(),r=_.height(),r=(t=v.getContentSize()).h-r,i=t.w-i,v.rail.scrollable&&!v.railh.scrollable?v.rail.drag.ck=0<r&&"v":!v.rail.scrollable&&v.railh.scrollable?v.rail.drag.ck=0<i&&"h":v.rail.drag.ck=!1),b.emulatetouch&&v.isiframe&&y.isie&&(i=v.win.position(),v.rail.drag.x+=i.left,v.rail.drag.y+=i.top),v.hasmoving=!1,v.lastmouseup=!1,v.scrollmom.reset(e.clientX,e.clientY),o&&s){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(o.nodeName))return y.hasmousecapture&&o.setCapture(),b.emulatetouch?(o.onclick&&!o._onclick&&(o._onclick=o.onclick,o.onclick=function(e){if(v.hasmoving)return!1;o._onclick.call(this,e)}),v.cancelEvent(e)):v.stopPropagation(e);/SUBMIT|CANCEL|BUTTON/i.test(P(o).attr("type"))&&(v.preventclick={tg:o,click:!1})}}},v.ontouchend=function(e){if(!v.rail.drag)return!0;if(2!=v.rail.drag.pt)return 1==v.rail.drag.pt?v.onmouseup(e):void 0;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!1;v.rail.drag=!1;var o="mouseup"===e.type;return v.hasmoving&&(v.scrollmom.doMomentum(),v.lastmouseup=!0,v.hideCursor(),y.hasmousecapture&&N.releaseCapture(),o)?v.cancelEvent(e):void 0},d=b.emulatetouch&&v.isiframe&&!y.hasmousecapture,u=.3*b.directionlockdeadzone|0,v.ontouchmove=function(e,o){if(!v.rail.drag)return!0;if(e.targetTouches&&b.preventmultitouchscrolling&&1<e.targetTouches.length)return!0;if(e.pointerType&&("mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))return!0;if(2!=v.rail.drag.pt)return 1==v.rail.drag.pt?v.onmousemove(e):void 0;"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),a=s=0,d&&!o&&(a=-(r=v.win.position()).left,s=-r.top);var t=e.clientY+s,r=t-v.rail.drag.y,i=e.clientX+a,s=i-v.rail.drag.x,n=v.rail.drag.st-r;if(v.ishwscroll&&b.bouncescroll)n<0?n=Math.round(n/2):n>v.page.maxh&&(n=v.page.maxh+Math.round((n-v.page.maxh)/2));else if(n<0?t=n=0:n>v.page.maxh&&(n=v.page.maxh,t=0),0===t&&!v.hasmoving)return v.ispage||(v.rail.drag=!1),!0;var l=v.getScrollLeft();if(v.railh&&v.railh.scrollable&&(l=v.isrtlmode?s-v.rail.drag.sl:v.rail.drag.sl-s,v.ishwscroll&&b.bouncescroll?l<0?l=Math.round(l/2):l>v.page.maxw&&(l=v.page.maxw+Math.round((l-v.page.maxw)/2)):(l<0&&(i=l=0),l>v.page.maxw&&(l=v.page.maxw,i=0))),!v.hasmoving){if(v.rail.drag.y===e.clientY&&v.rail.drag.x===e.clientX)return v.cancelEvent(e);var a=Math.abs(r),r=Math.abs(s),s=b.directionlockdeadzone;if(v.rail.drag.ck?"v"==v.rail.drag.ck?s<r&&a<=u?v.rail.drag=!1:s<a&&(v.rail.drag.dl="v"):"h"==v.rail.drag.ck&&(s<a&&r<=u?v.rail.drag=!1:s<r&&(v.rail.drag.dl="h")):s<a&&s<r?v.rail.drag.dl="f":s<a?v.rail.drag.dl=u<r?"f":"v":s<r&&(v.rail.drag.dl=u<a?"f":"h"),!v.rail.drag.dl)return v.cancelEvent(e);v.triggerScrollStart(e.clientX,e.clientY,0,0,0),v.hasmoving=!0}return v.preventclick&&!v.preventclick.click&&(v.preventclick.click=v.preventclick.tg.onclick||!1,v.preventclick.tg.onclick=v.onpreventclick),v.rail.drag.dl&&("v"==v.rail.drag.dl?l=v.rail.drag.sl:"h"==v.rail.drag.dl&&(n=v.rail.drag.st)),v.synched("touchmove",function(){v.rail.drag&&2==v.rail.drag.pt&&(v.prepareTransition&&v.resetTransition(),v.rail.scrollable&&v.setScrollTop(n),v.scrollmom.update(i,t),v.railh&&v.railh.scrollable?(v.setScrollLeft(l),v.showCursor(n,l)):v.showCursor(n),y.isie10&&N.selection.clear())}),v.cancelEvent(e)},v.ontouchstartCursor=function(e,o){if(!v.rail.drag||3==v.rail.drag.pt){if(v.locked)return v.cancelEvent(e);v.cancelScroll(),v.rail.drag={x:e.touches[0].clientX,y:e.touches[0].clientY,sx:v.scroll.x,sy:v.scroll.y,pt:3,hr:!!o};o=v.getTarget(e);return!v.ispage&&y.hasmousecapture&&o.setCapture(),v.isiframe&&!y.hasmousecapture&&(v.saved.csspointerevents=v.doc.css("pointer-events"),v.css(v.doc,{"pointer-events":"none"})),v.cancelEvent(e)}},v.ontouchendCursor=function(e){if(v.rail.drag&&(y.hasmousecapture&&N.releaseCapture(),v.isiframe&&!y.hasmousecapture&&v.doc.css("pointer-events",v.saved.csspointerevents),3==v.rail.drag.pt))return v.rail.drag=!1,v.cancelEvent(e)},v.ontouchmoveCursor=function(e){var o;if(v.rail.drag&&3==v.rail.drag.pt)return v.cursorfreezed=!0,v.rail.drag.hr?(v.scroll.x=v.rail.drag.sx+(e.touches[0].clientX-v.rail.drag.x),v.scroll.x<0&&(v.scroll.x=0),o=v.scrollvaluemaxw,v.scroll.x>o&&(v.scroll.x=o)):(v.scroll.y=v.rail.drag.sy+(e.touches[0].clientY-v.rail.drag.y),v.scroll.y<0&&(v.scroll.y=0),o=v.scrollvaluemax,v.scroll.y>o&&(v.scroll.y=o)),v.synched("touchmove",function(){v.rail.drag&&3==v.rail.drag.pt&&(v.showCursor(),v.rail.drag.hr?v.doScrollLeft(Math.round(v.scroll.x*v.scrollratio.x),b.cursordragspeed):v.doScrollTop(Math.round(v.scroll.y*v.scrollratio.y),b.cursordragspeed))}),v.cancelEvent(e)}),v.onmousedown=function(e,o){if(!v.rail.drag||1==v.rail.drag.pt){if(v.railslocked)return v.cancelEvent(e);v.cancelScroll(),v.rail.drag={x:e.clientX,y:e.clientY,sx:v.scroll.x,sy:v.scroll.y,pt:1,hr:o||!1};o=v.getTarget(e);return y.hasmousecapture&&o.setCapture(),v.isiframe&&!y.hasmousecapture&&(v.saved.csspointerevents=v.doc.css("pointer-events"),v.css(v.doc,{"pointer-events":"none"})),v.hasmoving=!1,v.cancelEvent(e)}},v.onmouseup=function(e){if(v.rail.drag)return 1!=v.rail.drag.pt||(y.hasmousecapture&&N.releaseCapture(),v.isiframe&&!y.hasmousecapture&&v.doc.css("pointer-events",v.saved.csspointerevents),v.rail.drag=!1,v.cursorfreezed=!1,v.hasmoving&&v.triggerScrollEnd(),v.cancelEvent(e))},v.onmousemove=function(e){var o;if(v.rail.drag){if(1===v.rail.drag.pt)return y.ischrome&&0===e.which?v.onmouseup(e):(v.cursorfreezed=!0,v.hasmoving||v.triggerScrollStart(e.clientX,e.clientY,0,0,0),v.hasmoving=!0,v.rail.drag.hr?(v.scroll.x=v.rail.drag.sx+(e.clientX-v.rail.drag.x),v.scroll.x<0&&(v.scroll.x=0),o=v.scrollvaluemaxw,v.scroll.x>o&&(v.scroll.x=o)):(v.scroll.y=v.rail.drag.sy+(e.clientY-v.rail.drag.y),v.scroll.y<0&&(v.scroll.y=0),o=v.scrollvaluemax,v.scroll.y>o&&(v.scroll.y=o)),v.synched("mousemove",function(){v.cursorfreezed&&(v.showCursor(),v.rail.drag.hr?v.scrollLeft(Math.round(v.scroll.x*v.scrollratio.x)):v.scrollTop(Math.round(v.scroll.y*v.scrollratio.y)))}),v.cancelEvent(e))}else v.checkarea=0},y.cantouch||b.emulatetouch?(v.onpreventclick=function(e){if(v.preventclick)return v.preventclick.tg.onclick=v.preventclick.click,v.preventclick=!1,v.cancelEvent(e)},v.onclick=!y.isios&&function(e){return!v.lastmouseup||(v.lastmouseup=!1,v.cancelEvent(e))},b.grabcursorenabled&&y.cursorgrabvalue&&(v.css(v.ispage?v.doc:v.win,{cursor:y.cursorgrabvalue}),v.css(v.rail,{cursor:y.cursorgrabvalue}))):(h=function(e){var o,t;v.selectiondrag&&(e&&(o=v.win.outerHeight(),0<(t=e.pageY-v.selectiondrag.top)&&t<o&&(t=0),o<=t&&(t-=o),v.selectiondrag.df=t),0!==v.selectiondrag.df&&(t=-2*v.selectiondrag.df/6|0,v.doScrollBy(t),v.debounced("doselectionscroll",function(){h()},50)))},"getSelection"in N?v.hasTextSelected=function(){return 0<N.getSelection().rangeCount}:"selection"in N?v.hasTextSelected=function(){return"None"!=N.selection.type}:v.hasTextSelected=function(){return!1},v.onselectionstart=function(e){v.ispage||(v.selectiondrag=v.win.offset())},v.onselectionend=function(e){v.selectiondrag=!1},v.onselectiondrag=function(e){v.selectiondrag&&v.hasTextSelected()&&v.debounced("selectionscroll",function(){h(e)},250)}),y.hasw3ctouch?(v.css(v.ispage?P("html"):v.win,{"touch-action":"none"}),v.css(v.rail,{"touch-action":"none"}),v.css(v.cursor,{"touch-action":"none"}),v.bind(v.win,"pointerdown",v.ontouchstart),v.bind(N,"pointerup",v.ontouchend),v.delegate(N,"pointermove",v.ontouchmove)):y.hasmstouch?(v.css(v.ispage?P("html"):v.win,{"-ms-touch-action":"none"}),v.css(v.rail,{"-ms-touch-action":"none"}),v.css(v.cursor,{"-ms-touch-action":"none"}),v.bind(v.win,"MSPointerDown",v.ontouchstart),v.bind(N,"MSPointerUp",v.ontouchend),v.delegate(N,"MSPointerMove",v.ontouchmove),v.bind(v.cursor,"MSGestureHold",function(e){e.preventDefault()}),v.bind(v.cursor,"contextmenu",function(e){e.preventDefault()})):y.cantouch&&(v.bind(v.win,"touchstart",v.ontouchstart,!1,!0),v.bind(N,"touchend",v.ontouchend,!1,!0),v.bind(N,"touchcancel",v.ontouchend,!1,!0),v.delegate(N,"touchmove",v.ontouchmove,!1,!0)),b.emulatetouch&&(v.bind(v.win,"mousedown",v.ontouchstart,!1,!0),v.bind(N,"mouseup",v.ontouchend,!1,!0),v.bind(N,"mousemove",v.ontouchmove,!1,!0)),!b.cursordragontouch&&(y.cantouch||b.emulatetouch)||(v.rail.css({cursor:"default"}),v.railh&&v.railh.css({cursor:"default"}),v.jqbind(v.rail,"mouseenter",function(){return!(!v.ispage&&!v.win.is(":visible"))&&(v.canshowonmouseevent&&v.showCursor(),void(v.rail.active=!0))}),v.jqbind(v.rail,"mouseleave",function(){v.rail.active=!1,v.rail.drag||v.hideCursor()}),b.sensitiverail&&(v.bind(v.rail,"click",function(e){v.doRailClick(e,!1,!1)}),v.bind(v.rail,"dblclick",function(e){v.doRailClick(e,!0,!1)}),v.bind(v.cursor,"click",function(e){v.cancelEvent(e)}),v.bind(v.cursor,"dblclick",function(e){v.cancelEvent(e)})),v.railh&&(v.jqbind(v.railh,"mouseenter",function(){return!(!v.ispage&&!v.win.is(":visible"))&&(v.canshowonmouseevent&&v.showCursor(),void(v.rail.active=!0))}),v.jqbind(v.railh,"mouseleave",function(){v.rail.active=!1,v.rail.drag||v.hideCursor()}),b.sensitiverail&&(v.bind(v.railh,"click",function(e){v.doRailClick(e,!1,!0)}),v.bind(v.railh,"dblclick",function(e){v.doRailClick(e,!0,!0)}),v.bind(v.cursorh,"click",function(e){v.cancelEvent(e)}),v.bind(v.cursorh,"dblclick",function(e){v.cancelEvent(e)})))),b.cursordragontouch&&(this.istouchcapable||y.cantouch)&&(v.bind(v.cursor,"touchstart",v.ontouchstartCursor),v.bind(v.cursor,"touchmove",v.ontouchmoveCursor),v.bind(v.cursor,"touchend",v.ontouchendCursor),v.cursorh&&v.bind(v.cursorh,"touchstart",function(e){v.ontouchstartCursor(e,!0)}),v.cursorh&&v.bind(v.cursorh,"touchmove",v.ontouchmoveCursor),v.cursorh&&v.bind(v.cursorh,"touchend",v.ontouchendCursor)),b.emulatetouch||y.isandroid||y.isios?(v.bind(y.hasmousecapture?v.win:N,"mouseup",v.ontouchend),v.onclick&&v.bind(N,"click",v.onclick),b.cursordragontouch?(v.bind(v.cursor,"mousedown",v.onmousedown),v.bind(v.cursor,"mouseup",v.onmouseup),v.cursorh&&v.bind(v.cursorh,"mousedown",function(e){v.onmousedown(e,!0)}),v.cursorh&&v.bind(v.cursorh,"mouseup",v.onmouseup)):(v.bind(v.rail,"mousedown",function(e){e.preventDefault()}),v.railh&&v.bind(v.railh,"mousedown",function(e){e.preventDefault()}))):(v.bind(y.hasmousecapture?v.win:N,"mouseup",v.onmouseup),v.bind(N,"mousemove",v.onmousemove),v.onclick&&v.bind(N,"click",v.onclick),v.bind(v.cursor,"mousedown",v.onmousedown),v.bind(v.cursor,"mouseup",v.onmouseup),v.railh&&(v.bind(v.cursorh,"mousedown",function(e){v.onmousedown(e,!0)}),v.bind(v.cursorh,"mouseup",v.onmouseup)),!v.ispage&&b.enablescrollonselection&&(v.bind(v.win[0],"mousedown",v.onselectionstart),v.bind(N,"mouseup",v.onselectionend),v.bind(v.cursor,"mouseup",v.onselectionend),v.cursorh&&v.bind(v.cursorh,"mouseup",v.onselectionend),v.bind(N,"mousemove",v.onselectiondrag)),v.zoom&&(v.jqbind(v.zoom,"mouseenter",function(){v.canshowonmouseevent&&v.showCursor(),v.rail.active=!0}),v.jqbind(v.zoom,"mouseleave",function(){v.rail.active=!1,v.rail.drag||v.hideCursor()}))),b.enablemousewheel&&(v.isiframe||v.mousewheel(y.isie&&v.ispage?N:v.win,v.onmousewheel),v.mousewheel(v.rail,v.onmousewheel),v.railh&&v.mousewheel(v.railh,v.onmousewheelhr)),v.ispage||y.cantouch||/HTML|^BODY/.test(v.win[0].nodeName)||(v.win.attr("tabindex")||v.win.attr({tabindex:++L}),v.bind(v.win,"focus",function(e){T=v.getTarget(e).id||v.getTarget(e)||!1,v.hasfocus=!0,v.canshowonmouseevent&&v.noticeCursor()}),v.bind(v.win,"blur",function(e){T=!1,v.hasfocus=!1}),v.bind(v.win,"mouseenter",function(e){E=v.getTarget(e).id||v.getTarget(e)||!1,v.hasmousefocus=!0,v.canshowonmouseevent&&v.noticeCursor()}),v.bind(v.win,"mouseleave",function(e){E=!1,v.hasmousefocus=!1,v.rail.drag||v.hideCursor()})),v.onkeypress=function(e){if(v.railslocked&&0===v.page.maxh)return!0;e=e||R.event;var o=v.getTarget(e);if(o&&/INPUT|TEXTAREA|SELECT|OPTION/.test(o.nodeName)&&(!(o.getAttribute("type")||o.type||!1)||!/submit|button|cancel/i.tp))return!0;if(P(o).attr("contenteditable"))return!0;if(v.hasfocus||v.hasmousefocus&&!T||v.ispage&&!T&&!E){o=e.keyCode;if(v.railslocked&&27!=o)return v.cancelEvent(e);var t=e.ctrlKey||!1,r=e.shiftKey||!1,i=!1;switch(o){case 38:case 63233:v.doScrollBy(72),i=!0;break;case 40:case 63235:v.doScrollBy(-72),i=!0;break;case 37:case 63232:v.railh&&(t?v.doScrollLeft(0):v.doScrollLeftBy(72),i=!0);break;case 39:case 63234:v.railh&&(t?v.doScrollLeft(v.page.maxw):v.doScrollLeftBy(-72),i=!0);break;case 33:case 63276:v.doScrollBy(v.view.h),i=!0;break;case 34:case 63277:v.doScrollBy(-v.view.h),i=!0;break;case 36:case 63273:v.railh&&t?v.doScrollPos(0,0):v.doScrollTo(0),i=!0;break;case 35:case 63275:v.railh&&t?v.doScrollPos(v.page.maxw,v.page.maxh):v.doScrollTo(v.page.maxh),i=!0;break;case 32:b.spacebarenabled&&(r?v.doScrollBy(v.view.h):v.doScrollBy(-v.view.h),i=!0);break;case 27:v.zoomactive&&(v.doZoom(),i=!0)}return i?v.cancelEvent(e):void 0}},b.enablekeyboard&&v.bind(N,y.isopera&&!y.isopera12?"keypress":"keydown",v.onkeypress),v.bind(N,"keydown",function(e){!e.ctrlKey&&1||(v.wheelprevented=!0)}),v.bind(N,"keyup",function(e){e.ctrlKey||!1||(v.wheelprevented=!1)}),v.bind(R,"blur",function(e){v.wheelprevented=!1}),v.bind(R,"resize",v.onscreenresize),v.bind(R,"orientationchange",v.onscreenresize),v.bind(R,"load",v.lazyResize),!y.ischrome||v.ispage||v.haswrapper||(p=v.win.attr("style"),m=parseFloat(v.win.css("width"))+1,v.win.css("width",m),v.synched("chromefix",function(){v.win.attr("style",p)})),v.onAttributeChange=function(e){v.lazyResize(v.isieold?250:30)},b.enableobserver&&(v.isie11||!1===B||(v.observerbody=new B(function(e){if(e.forEach(function(e){if("attributes"==e.type)return w.hasClass("modal-open")&&w.hasClass("modal-dialog")&&!P.contains(P(".modal-dialog")[0],v.doc[0])?v.hide():v.show()}),v.me.clientWidth!=v.page.width||v.me.clientHeight!=v.page.height)return v.lazyResize(30)}),v.observerbody.observe(N.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),v.ispage||v.haswrapper||(f=v.win[0],!1!==B?(v.observer=new B(function(e){e.forEach(v.onAttributeChange)}),v.observer.observe(f,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),v.observerremover=new B(function(e){e.forEach(function(e){if(0<e.removedNodes.length)for(var o in e.removedNodes)if(v&&e.removedNodes[o]===f)return v.remove()})}),v.observerremover.observe(f.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(v.bind(f,y.isie&&!y.isie9?"propertychange":"DOMAttrModified",v.onAttributeChange),y.isie9&&f.attachEvent("onpropertychange",v.onAttributeChange),v.bind(f,"DOMNodeRemoved",function(e){e.target===f&&v.remove()})))),!v.ispage&&b.boxzoom&&v.bind(R,"resize",v.resizeZoom),v.istextarea&&(v.bind(v.win,"keydown",v.lazyResize),v.bind(v.win,"mouseup",v.lazyResize)),v.lazyResize(30)}"IFRAME"==this.doc[0].nodeName&&(e=function(){var o,e;v.iframexd=!1;try{(o="contentDocument"in this?this.contentDocument:this.contentWindow._doc).domain}catch(e){o=!(v.iframexd=!0)}if(v.iframexd)return"console"in R&&console.log("NiceScroll error: policy restriced iframe"),!0;v.forcescreen=!0,v.isiframe&&(v.iframe={doc:P(o),html:v.doc.contents().find("html")[0],body:v.doc.contents().find("body")[0]},v.getContentSize=function(){return{w:Math.max(v.iframe.html.scrollWidth,v.iframe.body.scrollWidth),h:Math.max(v.iframe.html.scrollHeight,v.iframe.body.scrollHeight)}},v.docscroll=P(v.iframe.body)),y.isios||!b.iframeautoresize||v.isiframe||(v.win.scrollTop(0),v.doc.height(""),e=Math.max(o.getElementsByTagName("html")[0].scrollHeight,o.body.scrollHeight),v.doc.height(e)),v.lazyResize(30),v.css(P(v.iframe.body),t),y.isios&&v.haswrapper&&v.css(P(o.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?v.bind(this.contentWindow,"scroll",v.onscroll):v.bind(o,"scroll",v.onscroll),b.enablemousewheel&&v.mousewheel(o,v.onmousewheel),b.enablekeyboard&&v.bind(o,y.isopera?"keypress":"keydown",v.onkeypress),y.cantouch?(v.bind(o,"touchstart",v.ontouchstart),v.bind(o,"touchmove",v.ontouchmove)):b.emulatetouch&&(v.bind(o,"mousedown",v.ontouchstart),v.bind(o,"mousemove",function(e){return v.ontouchmove(e,!0)}),b.grabcursorenabled&&y.cursorgrabvalue&&v.css(P(o.body),{cursor:y.cursorgrabvalue})),v.bind(o,"mouseup",v.ontouchend),v.zoom&&(b.dblclickzoom&&v.bind(o,"dblclick",v.doZoom),v.ongesturezoom&&v.bind(o,"gestureend",v.ongesturezoom))},this.doc[0].readyState&&"complete"===this.doc[0].readyState&&setTimeout(function(){e.call(v.doc[0],!1)},500),v.bind(this.doc,"load",e))},this.showCursor=function(e,o){v.cursortimeout&&(clearTimeout(v.cursortimeout),v.cursortimeout=0),v.rail&&(v.autohidedom&&(v.autohidedom.stop().css({opacity:b.cursoropacitymax}),v.cursoractive=!0),v.rail.drag&&1==v.rail.drag.pt||(void 0!==e&&!1!==e&&(v.scroll.y=e/v.scrollratio.y|0),void 0!==o&&(v.scroll.x=o/v.scrollratio.x|0)),v.cursor.css({height:v.cursorheight,top:v.scroll.y}),v.cursorh&&(o=v.hasreversehr?v.scrollvaluemaxw-v.scroll.x:v.scroll.x,v.cursorh.css({width:v.cursorwidth,left:!v.rail.align&&v.rail.visibility?o+v.rail.width:o}),v.cursoractive=!0),v.zoom&&v.zoom.stop().css({opacity:b.cursoropacitymax}))},this.hideCursor=function(e){v.cursortimeout||v.rail&&v.autohidedom&&(v.hasmousefocus&&"leave"===b.autohidemode||(v.cursortimeout=setTimeout(function(){v.rail.active&&v.showonmouseevent||(v.autohidedom.stop().animate({opacity:b.cursoropacitymin}),v.zoom&&v.zoom.stop().animate({opacity:b.cursoropacitymin}),v.cursoractive=!1),v.cursortimeout=0},e||b.hidecursordelay)))},this.noticeCursor=function(e,o,t){v.showCursor(o,t),v.rail.active||v.hideCursor(e)},this.getContentSize=v.ispage?function(){return{w:Math.max(N.body.scrollWidth,N.documentElement.scrollWidth),h:Math.max(N.body.scrollHeight,N.documentElement.scrollHeight)}}:v.haswrapper?function(){return{w:v.doc[0].offsetWidth,h:v.doc[0].offsetHeight}}:function(){return{w:v.docscroll[0].scrollWidth,h:v.docscroll[0].scrollHeight}},this.onResize=function(e,o){if(!v||!v.win)return!1;var t=v.page.maxh,r=v.page.maxw,i=v.view.h,s=v.view.w;if(v.view={w:v.ispage?v.win.width():v.win[0].clientWidth,h:v.ispage?v.win.height():v.win[0].clientHeight},v.page=o||v.getContentSize(),v.page.maxh=Math.max(0,v.page.h-v.view.h),v.page.maxw=Math.max(0,v.page.w-v.view.w),v.page.maxh==t&&v.page.maxw==r&&v.view.w==s&&v.view.h==i){if(v.ispage)return v;s=v.win.offset();if(v.lastposition){i=v.lastposition;if(i.top==s.top&&i.left==s.left)return v}v.lastposition=s}return 0===v.page.maxh?(v.hideRail(),v.scrollvaluemax=0,v.scroll.y=0,v.scrollratio.y=0,v.cursorheight=0,v.setScrollTop(0),v.rail&&(v.rail.scrollable=!1)):(v.page.maxh-=b.railpadding.top+b.railpadding.bottom,v.rail.scrollable=!0),0===v.page.maxw?(v.hideRailHr(),v.scrollvaluemaxw=0,v.scroll.x=0,v.scrollratio.x=0,v.cursorwidth=0,v.setScrollLeft(0),v.railh&&(v.railh.scrollable=!1)):(v.page.maxw-=b.railpadding.left+b.railpadding.right,v.railh&&(v.railh.scrollable=b.horizrailenabled)),v.railslocked=v.locked||0===v.page.maxh&&0===v.page.maxw,v.railslocked?(v.ispage||v.updateScrollBar(v.view),!1):(v.hidden||(v.rail.visibility||v.showRail(),v.railh&&!v.railh.visibility&&v.showRailHr()),v.istextarea&&v.win.css("resize")&&"none"!=v.win.css("resize")&&(v.view.h-=20),v.cursorheight=Math.min(v.view.h,Math.round(v.view.h*(v.view.h/v.page.h))),v.cursorheight=b.cursorfixedheight||Math.max(b.cursorminheight,v.cursorheight),v.cursorwidth=Math.min(v.view.w,Math.round(v.view.w*(v.view.w/v.page.w))),v.cursorwidth=b.cursorfixedheight||Math.max(b.cursorminheight,v.cursorwidth),v.scrollvaluemax=v.view.h-v.cursorheight-(b.railpadding.top+b.railpadding.bottom),v.hasborderbox||(v.scrollvaluemax-=v.cursor[0].offsetHeight-v.cursor[0].clientHeight),v.railh&&(v.railh.width=0<v.page.maxh?v.view.w-v.rail.width:v.view.w,v.scrollvaluemaxw=v.railh.width-v.cursorwidth-(b.railpadding.left+b.railpadding.right)),v.ispage||v.updateScrollBar(v.view),v.scrollratio={x:v.page.maxw/v.scrollvaluemaxw,y:v.page.maxh/v.scrollvaluemax},v.getScrollTop()>v.page.maxh?v.doScrollTop(v.page.maxh):(v.scroll.y=v.getScrollTop()/v.scrollratio.y|0,v.scroll.x=v.getScrollLeft()/v.scrollratio.x|0,v.cursoractive&&v.noticeCursor()),v.scroll.y&&0===v.getScrollTop()&&v.doScrollTo(v.scroll.y*v.scrollratio.y|0),v)},this.resize=v.onResize;var c=0;function d(t,r,i,e){v._bind(t,r,function(e){var o={original:e=e||R.event,target:e.target||e.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==e.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return e.preventDefault?e.preventDefault():e.returnValue=!1,!1},stopImmediatePropagation:function(){e.stopImmediatePropagation?e.stopImmediatePropagation():e.cancelBubble=!0}};return"mousewheel"==r?(e.wheelDeltaX&&(o.deltaX=-.025*e.wheelDeltaX),e.wheelDeltaY&&(o.deltaY=-.025*e.wheelDeltaY),o.deltaY||o.deltaX||(o.deltaY=-.025*e.wheelDelta)):o.deltaY=e.detail,i.call(t,o)},e)}this.onscreenresize=function(e){clearTimeout(c);var o=!v.ispage&&!v.haswrapper;o&&v.hideRails(),c=setTimeout(function(){v&&(o&&v.showRails(),v.resize()),c=0},120)},this.lazyResize=function(e){return clearTimeout(c),e=isNaN(e)?240:e,c=setTimeout(function(){v&&v.resize(),c=0},e),v},this.jqbind=function(e,o,t){v.events.push({e:e,n:o,f:t,q:!0}),P(e).on(o,t)};var u=!(this.mousewheel=function(e,o,t){var r="jquery"in e?e[0]:e;"onwheel"in N.createElement("div")?v._bind(r,"wheel",o,t||!1):(d(r,e=void 0!==N.onmousewheel?"mousewheel":"DOMMouseScroll",o,t||!1),"DOMMouseScroll"==e&&d(r,"MozMousePixelScroll",o,t||!1))});if(y.haseventlistener){try{var h=Object.defineProperty({},"passive",{get:function(){u=!0}});R.addEventListener("test",null,h)}catch(e){}this.stopPropagation=function(e){return e&&(e=e.original||e).stopPropagation(),!1},this.cancelEvent=function(e){return e.cancelable&&e.preventDefault(),e.stopImmediatePropagation(),e.preventManipulation&&e.preventManipulation(),!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},R.constructor.prototype.addEventListener=N.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(e,o,t){this.attachEvent("on"+e,o)},R.constructor.prototype.removeEventListener=N.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(e,o,t){this.detachEvent("on"+e,o)},this.cancelEvent=function(e){return(e=e||R.event)&&(e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1),!1},this.stopPropagation=function(e){return(e=e||R.event)&&(e.cancelBubble=!0),!1};this.delegate=function(e,o,t,r,i){var s=I[o]||!1;s||(s={a:[],l:[],f:function(e){for(var o=s.l,t=!1,r=o.length-1;0<=r;r--)if(!1===(t=o[r].call(e.target,e)))return!1;return t}},v.bind(e,o,s.f,r,i),I[o]=s),v.ispage?(s.a=[v.id].concat(s.a),s.l=[t].concat(s.l)):(s.a.push(v.id),s.l.push(t))},this.undelegate=function(e,o,t,r,i){var s=I[o]||!1;if(s&&s.l)for(var n=0,l=s.l.length;n<l;n++)s.a[n]===v.id&&(s.a.splice(n),s.l.splice(n),0===s.a.length&&(v._unbind(e,o,s.l.f),I[o]=null))},this.bind=function(e,o,t,r,i){e="jquery"in e?e[0]:e;v._bind(e,o,t,r||!1,i||!1)},this._bind=function(e,o,t,r,i){v.events.push({e:e,n:o,f:t,b:r,q:!1}),u&&(i||e==window.document||e==window.document.body||e==window)?e.addEventListener(o,t,{passive:!1,capture:r}):e.addEventListener(o,t,r||!1)},this._unbind=function(e,o,t,r){I[o]?v.undelegate(e,o,t,r):e.removeEventListener(o,t,r)},this.unbindAll=function(){for(var e=0;e<v.events.length;e++){var o=v.events[e];o.q?o.e.unbind(o.n,o.f):v._unbind(o.e,o.n,o.f,o.b)}},this.showRails=function(){return v.showRail().showRailHr()},this.showRail=function(){return 0===v.page.maxh||!v.ispage&&"none"==v.win.css("display")||(v.rail.visibility=!0,v.rail.css("display","block")),v},this.showRailHr=function(){return v.railh&&(0===v.page.maxw||!v.ispage&&"none"==v.win.css("display")||(v.railh.visibility=!0,v.railh.css("display","block"))),v},this.hideRails=function(){return v.hideRail().hideRailHr()},this.hideRail=function(){return v.rail.visibility=!1,v.rail.css("display","none"),v},this.hideRailHr=function(){return v.railh&&(v.railh.visibility=!1,v.railh.css("display","none")),v},this.show=function(){return v.hidden=!1,v.railslocked=!1,v.showRails()},this.hide=function(){return v.hidden=!0,v.railslocked=!0,v.hideRails()},this.toggle=function(){return v.hidden?v.show():v.hide()},this.remove=function(){for(var e in v.stop(),v.cursortimeout&&clearTimeout(v.cursortimeout),v.delaylist)v.delaylist[e]&&Y(v.delaylist[e].h);v.doZoomOut(),v.unbindAll(),y.isie9&&v.win[0].detachEvent("onpropertychange",v.onAttributeChange),!1!==v.observer&&v.observer.disconnect(),!1!==v.observerremover&&v.observerremover.disconnect(),!1!==v.observerbody&&v.observerbody.disconnect(),v.events=null,v.cursor&&v.cursor.remove(),v.cursorh&&v.cursorh.remove(),v.rail&&v.rail.remove(),v.railh&&v.railh.remove(),v.zoom&&v.zoom.remove();for(var o=0;o<v.saved.css.length;o++){var t=v.saved.css[o];t[0].css(t[1],void 0===t[2]?"":t[2])}v.saved=!1,v.me.data("__nicescroll","");var r,i=P.nicescroll;for(r in i.each(function(e){if(this&&this.id===v.id){delete i[e];for(var o=++e;o<i.length;o++,e++)i[e]=i[o];i.length--,i.length&&delete i[i.length]}}),v)v[r]=null,delete v[r];v=null},this.scrollstart=function(e){return this.onscrollstart=e,v},this.scrollend=function(e){return this.onscrollend=e,v},this.scrollcancel=function(e){return this.onscrollcancel=e,v},this.zoomin=function(e){return this.onzoomin=e,v},this.zoomout=function(e){return this.onzoomout=e,v},this.isScrollable=function(e){var o=e.target||e;if("OPTION"==o.nodeName)return!0;for(;o&&1==o.nodeType&&o!==this.me[0]&&!/^BODY|HTML/.test(o.nodeName);){var t=P(o),t=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(t))return o.clientHeight!=o.scrollHeight;o=o.parentNode||!1}return!1},this.getViewport=function(e){for(var o=!(!e||!e.parentNode)&&e.parentNode;o&&1==o.nodeType&&!/^BODY|HTML/.test(o.nodeName);){var t=P(o);if(/fixed|absolute/.test(t.css("position")))return t;var r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r)&&o.clientHeight!=o.scrollHeight)return t;if(0<t.getNiceScroll().length)return t;o=o.parentNode||!1}return!1},this.triggerScrollStart=function(e,o,t,r,i){v.onscrollstart&&(i={type:"scrollstart",current:{x:e,y:o},request:{x:t,y:r},end:{x:v.newscrollx,y:v.newscrolly},speed:i},v.onscrollstart.call(v,i))},this.triggerScrollEnd=function(){var e,o;v.onscrollend&&(o={type:"scrollend",current:{x:e=v.getScrollLeft(),y:o=v.getScrollTop()},end:{x:e,y:o}},v.onscrollend.call(v,o))};var p=0,m=0,f=0,g=1;function x(e,o,t,r){v.scrollrunning||(v.newscrolly=v.getScrollTop(),v.newscrollx=v.getScrollLeft(),f=X());var i=X()-f;if(f=X(),350<i?g=1:g+=(2-g)/10,o=o*g|0,e=e*g|0){if(r)if(e<0){if(v.getScrollLeft()>=v.page.maxw)return!0}else if(v.getScrollLeft()<=0)return!0;r=0<e?1:-1;m!==r&&(v.scrollmom&&v.scrollmom.stop(),v.newscrollx=v.getScrollLeft(),m=r),v.lastdeltax-=e}if(o){if(function(){var e=v.getScrollTop();if(o<0){if(e>=v.page.maxh)return!0}else if(e<=0)return!0}()){if(b.nativeparentscrolling&&t&&!v.ispage&&!v.zoomactive)return!0;var s=v.view.h>>1;o=v.newscrolly<-s?(v.newscrolly=-s,-1):v.newscrolly>v.page.maxh+s?(v.newscrolly=v.page.maxh+s,1):0}s=0<o?1:-1;p!==s&&(v.scrollmom&&v.scrollmom.stop(),v.newscrolly=v.getScrollTop(),p=s),v.lastdeltay-=o}(o||e)&&v.synched("relativexy",function(){var e=v.lastdeltay+v.newscrolly;v.lastdeltay=0;var o=v.lastdeltax+v.newscrollx;v.lastdeltax=0,v.rail.drag||v.doScrollPos(o,e)})}var S,z=!1;function k(e,o,t){var r,i;return!(t||!z)||(0===e.deltaMode?(r=0|-(e.deltaX*(b.mousescrollstep/54)),i=0|-(e.deltaY*(b.mousescrollstep/54))):1===e.deltaMode&&(r=-(e.deltaX*b.mousescrollstep)*50/80|0,i=-(e.deltaY*b.mousescrollstep)*50/80|0),o&&b.oneaxismousemode&&0===r&&i&&(r=i,i=0,t&&(r<0?v.getScrollLeft()>=v.page.maxw:v.getScrollLeft()<=0)&&(i=r,r=0)),v.isrtlmode&&(r=-r),x(r,i,t,!0)?void(t&&(z=!0)):(z=!1,e.stopImmediatePropagation(),e.preventDefault()))}this.onmousewheel=function(e){if(v.wheelprevented||v.locked)return!1;if(v.railslocked)return v.debounced("checkunlock",v.resize,250),!1;if(v.rail.drag)return v.cancelEvent(e);if("auto"===b.oneaxismousemode&&0!==e.deltaX&&(b.oneaxismousemode=!1),b.oneaxismousemode&&0===e.deltaX&&!v.rail.scrollable)return!v.railh||!v.railh.scrollable||v.onmousewheelhr(e);var o=X(),t=!1;if(b.preservenativescrolling&&v.checkarea+600<o&&(v.nativescrollingarea=v.isScrollable(e),t=!0),v.checkarea=o,v.nativescrollingarea)return!0;t=k(e,!1,t);return t&&(v.checkarea=0),t},this.onmousewheelhr=function(e){if(!v.wheelprevented){if(v.railslocked||!v.railh.scrollable)return!0;if(v.rail.drag)return v.cancelEvent(e);var o=X(),t=!1;return b.preservenativescrolling&&v.checkarea+600<o&&(v.nativescrollingarea=v.isScrollable(e),t=!0),v.checkarea=o,!!v.nativescrollingarea||(v.railslocked?v.cancelEvent(e):k(e,!0,t))}},this.stop=function(){return v.cancelScroll(),v.scrollmon&&v.scrollmon.stop(),v.cursorfreezed=!1,v.scroll.y=Math.round(v.getScrollTop()*(1/v.scrollratio.y)),v.noticeCursor(),v},this.getTransitionSpeed=function(e){return 80+e/72*b.scrollspeed|0},b.smoothscroll?v.ishwscroll&&y.hastransition&&b.usetransition&&b.smoothscroll?(S="",this.resetTransition=function(){S="",v.doc.css(y.prefixstyle+"transition-duration","0ms")},this.prepareTransition=function(e,o){o=o?e:v.getTransitionSpeed(e),e=o+"ms";return S!==e&&(S=e,v.doc.css(y.prefixstyle+"transition-duration",e)),o},this.doScrollLeft=function(e,o){var t=v.scrollrunning?v.newscrolly:v.getScrollTop();v.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=v.scrollrunning?v.newscrollx:v.getScrollLeft();v.doScrollPos(t,e,o)},this.cursorupdate={running:!1,start:function(){var e,o=this;o.running||(o.running=!0,e=function(){o.running&&O(e),v.showCursor(v.getScrollTop(),v.getScrollLeft()),v.notifyScrollEvent(v.win[0])},O(e))},stop:function(){this.running=!1}},this.doScrollPos=function(e,o,t){var r=v.getScrollTop(),i=v.getScrollLeft();if(((v.newscrolly-r)*(o-r)<0||(v.newscrollx-i)*(e-i)<0)&&v.cancelScroll(),b.bouncescroll?(o<0?o=o/2|0:o>v.page.maxh&&(o=v.page.maxh+(o-v.page.maxh)/2|0),e<0?e=e/2|0:e>v.page.maxw&&(e=v.page.maxw+(e-v.page.maxw)/2|0)):(o<0?o=0:o>v.page.maxh&&(o=v.page.maxh),e<0?e=0:e>v.page.maxw&&(e=v.page.maxw)),v.scrollrunning&&e==v.newscrollx&&o==v.newscrolly)return!1;v.newscrolly=o,v.newscrollx=e;var s=v.getScrollTop(),r=v.getScrollLeft(),i={};i.x=e-r,i.y=o-s;i=0|Math.sqrt(i.x*i.x+i.y*i.y),i=v.prepareTransition(i);v.scrollrunning||(v.scrollrunning=!0,v.triggerScrollStart(r,s,e,o,i),v.cursorupdate.start()),v.scrollendtrapped=!0,y.transitionend||(v.scrollendtrapped&&clearTimeout(v.scrollendtrapped),v.scrollendtrapped=setTimeout(v.onScrollTransitionEnd,i)),v.setScrollTop(v.newscrolly),v.setScrollLeft(v.newscrollx)},this.cancelScroll=function(){if(!v.scrollendtrapped)return!0;var e=v.getScrollTop(),o=v.getScrollLeft();return v.scrollrunning=!1,y.transitionend||clearTimeout(y.transitionend),v.scrollendtrapped=!1,v.resetTransition(),v.setScrollTop(e),v.railh&&v.setScrollLeft(o),v.timerscroll&&v.timerscroll.tm&&clearInterval(v.timerscroll.tm),v.timerscroll=!1,v.cursorfreezed=!1,v.cursorupdate.stop(),v.showCursor(e,o),v},this.onScrollTransitionEnd=function(){if(v.scrollendtrapped){var e=v.getScrollTop(),o=v.getScrollLeft();if(e<0?e=0:e>v.page.maxh&&(e=v.page.maxh),o<0?o=0:o>v.page.maxw&&(o=v.page.maxw),e!=v.newscrolly||o!=v.newscrollx)return v.doScrollPos(o,e,b.snapbackspeed);v.scrollrunning&&v.triggerScrollEnd(),v.scrollrunning=!1,v.scrollendtrapped=!1,v.resetTransition(),v.timerscroll=!1,v.setScrollTop(e),v.railh&&v.setScrollLeft(o),v.cursorupdate.stop(),v.noticeCursor(!1,e,o),v.cursorfreezed=!1}}):(this.doScrollLeft=function(e,o){var t=v.scrollrunning?v.newscrolly:v.getScrollTop();v.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=v.scrollrunning?v.newscrollx:v.getScrollLeft();v.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=v.getScrollTop(),i=v.getScrollLeft();((v.newscrolly-r)*(o-r)<0||(v.newscrollx-i)*(e-i)<0)&&v.cancelScroll();var s=!1;if(v.bouncescroll&&v.rail.visibility||(o<0?s=!(o=0):o>v.page.maxh&&(o=v.page.maxh,s=!0)),v.bouncescroll&&v.railh.visibility||(e<0?s=!(e=0):e>v.page.maxw&&(e=v.page.maxw,s=!0)),v.scrollrunning&&v.newscrolly===o&&v.newscrollx===e)return!0;v.newscrolly=o,v.newscrollx=e,v.dst={},v.dst.x=e-i,v.dst.y=o-r,v.dst.px=i,v.dst.py=r;var n=0|Math.sqrt(v.dst.x*v.dst.x+v.dst.y*v.dst.y),n=v.getTransitionSpeed(n);v.bzscroll={};s=s?1:.58;v.bzscroll.x=new a(i,v.newscrollx,n,0,0,s,1),v.bzscroll.y=new a(r,v.newscrolly,n,0,0,s,1);X();var l=function(){var e;v.scrollrunning&&(e=v.bzscroll.y.getPos(),v.setScrollLeft(v.bzscroll.x.getNow()),v.setScrollTop(v.bzscroll.y.getNow()),e<=1?v.timer=O(l):(v.scrollrunning=!1,v.timer=0,v.triggerScrollEnd()))};v.scrollrunning||(v.triggerScrollStart(i,r,e,o,n),v.scrollrunning=!0,v.timer=O(l))},this.cancelScroll=function(){return v.timer&&Y(v.timer),v.timer=0,v.bzscroll=!1,v.scrollrunning=!1,v}):(this.doScrollLeft=function(e,o){var t=v.getScrollTop();v.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=v.getScrollLeft();v.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=e>v.page.maxw?v.page.maxw:e;r<0&&(r=0);var i=o>v.page.maxh?v.page.maxh:o;i<0&&(i=0),v.synched("scroll",function(){v.setScrollTop(i),v.setScrollLeft(r)})},this.cancelScroll=function(){}),this.doScrollBy=function(e,o){x(0,e)},this.doScrollLeftBy=function(e,o){x(e,0)},this.doScrollTo=function(e,o){o=o?Math.round(e*v.scrollratio.y):e;o<0?o=0:o>v.page.maxh&&(o=v.page.maxh),v.cursorfreezed=!1,v.doScrollTop(e)},this.checkContentSize=function(){var e=v.getContentSize();e.h==v.page.h&&e.w==v.page.w||v.resize(!1,e)},v.onscroll=function(e){v.rail.drag||v.cursorfreezed||v.synched("scroll",function(){v.scroll.y=Math.round(v.getScrollTop()/v.scrollratio.y),v.railh&&(v.scroll.x=Math.round(v.getScrollLeft()/v.scrollratio.x)),v.noticeCursor()})},v.bind(v.docscroll,"scroll",v.onscroll),this.doZoomIn=function(e){if(!v.zoomactive){v.zoomactive=!0,v.zoomrestore={style:{}};var o,t=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],r=v.win[0].style;for(o in t){var i=t[o];v.zoomrestore.style[i]=void 0!==r[i]?r[i]:""}v.zoomrestore.style.width=v.win.css("width"),v.zoomrestore.style.height=v.win.css("height"),v.zoomrestore.padding={w:v.win.outerWidth()-v.win.width(),h:v.win.outerHeight()-v.win.height()},y.isios4&&(v.zoomrestore.scrollTop=_.scrollTop(),_.scrollTop(0)),v.win.css({position:y.isios4?"absolute":"fixed",top:0,left:0,zIndex:C+100,margin:0});var s=v.win.css("backgroundColor");return""!==s&&!/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(s)||v.win.css("backgroundColor","#fff"),v.rail.css({zIndex:C+101}),v.zoom.css({zIndex:C+102}),v.zoom.css("backgroundPosition","0 -18px"),v.resizeZoom(),v.onzoomin&&v.onzoomin.call(v),v.cancelEvent(e)}},this.doZoomOut=function(e){if(v.zoomactive)return v.zoomactive=!1,v.win.css("margin",""),v.win.css(v.zoomrestore.style),y.isios4&&_.scrollTop(v.zoomrestore.scrollTop),v.rail.css({"z-index":v.zindex}),v.zoom.css({"z-index":v.zindex}),v.zoomrestore=!1,v.zoom.css("backgroundPosition","0 0"),v.onResize(),v.onzoomout&&v.onzoomout.call(v),v.cancelEvent(e)},this.doZoom=function(e){return v.zoomactive?v.doZoomOut(e):v.doZoomIn(e)},this.resizeZoom=function(){var e;v.zoomactive&&(e=v.getScrollTop(),v.win.css({width:_.width()-v.zoomrestore.padding.w+"px",height:_.height()-v.zoomrestore.padding.h+"px"}),v.onResize(),v.setScrollTop(Math.min(v.page.maxh,e)))},this.init(),P.nicescroll.push(this)}var o,B=R.MutationObserver||R.WebKitMutationObserver||!1,X=Date.now||function(){return(new Date).getTime()},D={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:0<(o=(o=N.currentScript||!!(o=N.getElementsByTagName("script")).length&&o[o.length-1])?o.src.split("?")[0]:"").split("/").length?o.split("/").slice(0,-1).join("/")+"/":"",preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1,scrollCLass:!1},r=!1,A=function(e){var d=this;this.nc=e,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.reset=function(e,o){d.stop(),d.steptime=0,d.lasttime=X(),d.speedx=0,d.speedy=0,d.lastx=e,d.lasty=o,d.lastscrollx=-1,d.lastscrolly=-1},this.update=function(e,o){var t=X();d.steptime=t-d.lasttime,d.lasttime=t;var r=o-d.lasty,i=e-d.lastx,s=d.nc.getScrollTop()+r,t=d.nc.getScrollLeft()+i;d.snapx=t<0||t>d.nc.page.maxw,d.snapy=s<0||s>d.nc.page.maxh,d.speedx=i,d.speedy=r,d.lastx=e,d.lasty=o},this.stop=function(){d.nc.unsynched("domomentum2d"),d.timer&&clearTimeout(d.timer),d.timer=0,d.lastscrollx=-1,d.lastscrolly=-1},this.doSnapy=function(e,o){var t=!1;o<0?t=!(o=0):o>d.nc.page.maxh&&(o=d.nc.page.maxh,t=!0),e<0?t=!(e=0):e>d.nc.page.maxw&&(e=d.nc.page.maxw,t=!0),t?d.nc.doScrollPos(e,o,d.nc.opt.snapbackspeed):d.nc.triggerScrollEnd()},this.doMomentum=function(e){var o=X(),t=e?o+e:d.lasttime,r=d.nc.getScrollLeft(),e=d.nc.getScrollTop(),i=d.nc.page.maxh,s=d.nc.page.maxw;d.speedx=0<s?Math.min(60,d.speedx):0,d.speedy=0<i?Math.min(60,d.speedy):0;t=t&&o-t<=60;(e<0||i<e||r<0||s<r)&&(t=!1);var n,l,a,c,r=!(!d.speedy||!t)&&d.speedy,t=!(!d.speedx||!t)&&d.speedx;r||t?(50<(n=Math.max(16,d.steptime))&&(t=n/50,d.speedx*=t,d.speedy*=t,n=50),d.demulxy=0,d.lastscrollx=d.nc.getScrollLeft(),d.chkx=d.lastscrollx,d.lastscrolly=d.nc.getScrollTop(),d.chky=d.lastscrolly,l=d.lastscrollx,a=d.lastscrolly,(c=function(){var e=600<X()-o?.04:.02;d.speedx&&(l=Math.floor(d.lastscrollx-d.speedx*(1-d.demulxy)),((d.lastscrollx=l)<0||s<l)&&(e=.1)),d.speedy&&(a=Math.floor(d.lastscrolly-d.speedy*(1-d.demulxy)),((d.lastscrolly=a)<0||i<a)&&(e=.1)),d.demulxy=Math.min(1,d.demulxy+e),d.nc.synched("domomentum2d",function(){d.speedx&&(d.nc.getScrollLeft(),d.chkx=l,d.nc.setScrollLeft(l)),d.speedy&&(d.nc.getScrollTop(),d.chky=a,d.nc.setScrollTop(a)),d.timer||(d.nc.hideCursor(),d.doSnapy(l,a))}),d.demulxy<1?d.timer=setTimeout(c,n):(d.stop(),d.nc.hideCursor(),d.doSnapy(l,a))})()):d.doSnapy(d.nc.getScrollLeft(),d.nc.getScrollTop())}},i=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(e,o,t){var r=P.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollTop():i.call(e)},set:function(e,o){var t=P.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollTop(parseInt(o)):i.call(e,o),this}},e.fn.scrollTop=function(o){if(void 0!==o)return this.each(function(){var e=P.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollTop(parseInt(o)):i.call(P(this),o)});var e=this[0]&&P.data(this[0],"__nicescroll")||!1;return e&&e.ishwscroll?e.getScrollTop():i.call(this)};var l=e.fn.scrollLeft;P.cssHooks.pageXOffset={get:function(e,o,t){var r=P.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollLeft():l.call(e)},set:function(e,o){var t=P.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollLeft(parseInt(o)):l.call(e,o),this}},e.fn.scrollLeft=function(o){if(void 0!==o)return this.each(function(){var e=P.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollLeft(parseInt(o)):l.call(P(this),o)});var e=this[0]&&P.data(this[0],"__nicescroll")||!1;return e&&e.ishwscroll?e.getScrollLeft():l.call(this)};function t(e){var o=this;if(this.length=0,this.name="nicescrollarray",this.each=function(e){return P.each(o,e),o},this.push=function(e){o[o.length]=e,o.length++},this.eq=function(e){return o[e]},e)for(var t=0;t<e.length;t++){var r=P.data(e[t],"__nicescroll")||!1;r&&(this[this.length]=r,this.length++)}return this}!function(e,o,t){for(var r=0,i=o.length;r<i;r++)t(e,o[r])}(t.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(e,o){e[o]=function(){var e=arguments;return this.each(function(){this[o].apply(this,e)})}}),e.fn.getNiceScroll=function(e){return void 0===e?new t(this):this[e]&&P.data(this[e],"__nicescroll")||!1},(e.expr.pseudos||e.expr[":"]).nicescroll=function(e){return void 0!==P.data(e,"__nicescroll")},P.fn.niceScroll=function(r,i){void 0!==i||"object"!=typeof r||"jquery"in r||(i=r,r=!1);var s=new t;return this.each(function(){var e=P(this),o=P.extend({},i);r&&(t=P(r),o.doc=1<t.length?P(r,e):t,o.win=e),!("doc"in o)||"win"in o||(o.win=e);var t=e.data("__nicescroll")||!1;t||(o.doc=o.doc||e,t=new n(o,e),e.data("__nicescroll",t)),s.push(t)}),1===s.length?s[0]:s},R.NiceScroll={getjQuery:function(){return e}},P.nicescroll||(P.nicescroll=new t,P.nicescroll.options=D)});
wppa-ajax.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
- * Version 8.0.00.004
6
  *
7
  */
8
 
2
  /* wppa-ajax.php
3
  *
4
  * Functions used in ajax requests
5
+ * Version 8.0.00.005
6
  *
7
  */
8
 
wppa-album-covers.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
- * Version 8.0.00.003
7
  *
8
  */
9
 
@@ -139,7 +139,7 @@ global $wpdb;
139
 
140
  // Find the slideshow link and onclick
141
  $href_slideshow = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( $albumid, $linkpage ) ) );
142
- if ( wppa_switch( 'allow_ajax' ) && ! $linkpage ) {
143
  $onclick_slideshow = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
144
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage ) ) . "', '" .
145
  wppa_convert_to_pretty( $href_slideshow ) . "' )";
@@ -148,7 +148,7 @@ global $wpdb;
148
 
149
  // Find the content 'View' link
150
  $href_content = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_album_url( $albumid, $linkpage ) ) );
151
- if ( wppa_switch( 'allow_ajax' ) && ! $linkpage ) {
152
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
153
  wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage ) ) . "', '" .
154
  wppa_convert_to_pretty( $href_content ) . "' )";
@@ -276,7 +276,7 @@ global $wpdb;
276
 
277
  // The Album title
278
  if ( $photolink ) {
279
- $target = wppa_switch( 'allow_ajax' ) ? '_self' : $photolink['target'];
280
  }
281
  else {
282
  $target = '';
@@ -477,7 +477,7 @@ global $wpdb;
477
 
478
  // Find the slideshow link and onclick
479
  $href_slideshow = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( $albumid, $linkpage ) ) );
480
- if ( wppa_switch( 'allow_ajax' ) && ! $linkpage ) {
481
  $onclick_slideshow = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
482
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage ) ) . "', '" .
483
  wppa_convert_to_pretty( $href_slideshow ) . "' )";
@@ -486,7 +486,7 @@ global $wpdb;
486
 
487
  // Find the content 'View' link
488
  $href_content = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_album_url( $albumid, $linkpage ) ) );
489
- if ( wppa_switch( 'allow_ajax' ) && ! $linkpage ) {
490
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
491
  wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage ) ) . "', '" .
492
  wppa_convert_to_pretty( $href_content ) . "' )";
@@ -509,7 +509,7 @@ global $wpdb;
509
  wppa_step_covercount( 'cover' );
510
 
511
  $pl = isset( $photolinks['0']['target'] ) ? $photolinks['0']['target'] : '_self';
512
- $target = wppa_switch( 'allow_ajax' ) ? '_self' : $pl;
513
 
514
  // Open the album box
515
  wppa_out( '<div' .
@@ -659,7 +659,7 @@ global $wpdb;
659
 
660
  // Find the slideshow link and onclick
661
  $href_slideshow = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( $albumid, $linkpage ) ) );
662
- if ( wppa_switch( 'allow_ajax' ) && ! $linkpage ) {
663
  $onclick_slideshow = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
664
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage ) ) . "', '" .
665
  wppa_convert_to_pretty( $href_slideshow ) . "' )";
@@ -668,7 +668,7 @@ global $wpdb;
668
 
669
  // Find the content 'View' link
670
  $href_content = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_album_url( $albumid, $linkpage ) ) );
671
- if ( wppa_switch( 'allow_ajax' ) && ! $linkpage ) {
672
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
673
  wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage ) ) . "', '" .
674
  wppa_convert_to_pretty( $href_content ) . "' )";
@@ -726,7 +726,7 @@ global $wpdb;
726
  }
727
  wppa_step_covercount( 'cover' );
728
 
729
- $target = wppa_switch( 'allow_ajax' ) ? '_self' : $photolink['target'];
730
 
731
  // Open the album box
732
  wppa_out( '<div' .
@@ -1634,19 +1634,19 @@ function wppa_get_album_title_attr_a( $albumid, $linktype, $linkpage, $has_conte
1634
  case 'thumbs':
1635
  case 'albums':
1636
  $href_title = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_album_url( $albumid, $linkpage, $linktype ) ) );
1637
- if ( wppa_switch( 'allow_ajax' ) ) {
1638
- $onclick_title = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
1639
- wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage, $linktype ) ) . "', '" . $href_title . "' )";
1640
- $href_title = "#";
1641
- }
1642
  break;
1643
  case 'slide':
1644
  $href_title = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( $albumid, $linkpage ) ) );
1645
- if ( wppa_switch( 'allow_ajax' ) ) {
1646
  $onclick_title = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
1647
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage, $linktype ) ) . "', '" . $href_title . "' )";
1648
  $href_title = "#";
1649
- }
1650
  break;
1651
  case 'none':
1652
  break;
@@ -1663,7 +1663,7 @@ function wppa_get_album_title_attr_a( $albumid, $linktype, $linkpage, $has_conte
1663
  else {
1664
  $href_title = '#';
1665
  }
1666
- if ( wppa_switch( 'allow_ajax' ) ) {
1667
  if ( $coverphoto ) {
1668
  $onclick_title = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
1669
  wppa_encrypt_url( wppa_get_image_url_ajax_by_id( $coverphoto ) ) . "', '" . $href_title . "' )";
@@ -1672,7 +1672,7 @@ function wppa_get_album_title_attr_a( $albumid, $linktype, $linkpage, $has_conte
1672
  $onclick_title = '';
1673
  }
1674
  $href_title = "#";
1675
- }
1676
  $title_title = _n( 'View the cover photo', 'View the cover photos' , $photocount, 'wp-photo-album-plus');
1677
  }
1678
  }
@@ -2058,7 +2058,7 @@ global $wpdb;
2058
  // Thumbnails and covers, show sub-album covers
2059
  // in case slideshow is requested on an empty album
2060
  if ( wppa_opt( 'cover_sublinks' ) == 'content' || ! $photocount ) {
2061
- if ( wppa_switch( 'allow_ajax' ) && ! $linkpage ) {
2062
  $href_content = '';
2063
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
2064
  wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage ) ) . "', '" .
@@ -2073,7 +2073,7 @@ global $wpdb;
2073
 
2074
  // Slideshow
2075
  elseif ( wppa_opt( 'cover_sublinks' ) == 'slide' ) {
2076
- if ( wppa_switch( 'allow_ajax' ) && ! $linkpage ) {
2077
  $href_content = '';
2078
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
2079
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage ) ) . "', '" .
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
+ * Version 8.0.00.005
7
  *
8
  */
9
 
139
 
140
  // Find the slideshow link and onclick
141
  $href_slideshow = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( $albumid, $linkpage ) ) );
142
+ if ( ! $linkpage ) {
143
  $onclick_slideshow = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
144
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage ) ) . "', '" .
145
  wppa_convert_to_pretty( $href_slideshow ) . "' )";
148
 
149
  // Find the content 'View' link
150
  $href_content = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_album_url( $albumid, $linkpage ) ) );
151
+ if ( ! $linkpage ) {
152
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
153
  wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage ) ) . "', '" .
154
  wppa_convert_to_pretty( $href_content ) . "' )";
276
 
277
  // The Album title
278
  if ( $photolink ) {
279
+ $target = '_self';
280
  }
281
  else {
282
  $target = '';
477
 
478
  // Find the slideshow link and onclick
479
  $href_slideshow = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( $albumid, $linkpage ) ) );
480
+ if ( ! $linkpage ) {
481
  $onclick_slideshow = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
482
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage ) ) . "', '" .
483
  wppa_convert_to_pretty( $href_slideshow ) . "' )";
486
 
487
  // Find the content 'View' link
488
  $href_content = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_album_url( $albumid, $linkpage ) ) );
489
+ if ( ! $linkpage ) {
490
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
491
  wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage ) ) . "', '" .
492
  wppa_convert_to_pretty( $href_content ) . "' )";
509
  wppa_step_covercount( 'cover' );
510
 
511
  $pl = isset( $photolinks['0']['target'] ) ? $photolinks['0']['target'] : '_self';
512
+ $target = '_self';
513
 
514
  // Open the album box
515
  wppa_out( '<div' .
659
 
660
  // Find the slideshow link and onclick
661
  $href_slideshow = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( $albumid, $linkpage ) ) );
662
+ if ( ! $linkpage ) {
663
  $onclick_slideshow = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
664
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage ) ) . "', '" .
665
  wppa_convert_to_pretty( $href_slideshow ) . "' )";
668
 
669
  // Find the content 'View' link
670
  $href_content = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_album_url( $albumid, $linkpage ) ) );
671
+ if ( ! $linkpage ) {
672
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
673
  wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage ) ) . "', '" .
674
  wppa_convert_to_pretty( $href_content ) . "' )";
726
  }
727
  wppa_step_covercount( 'cover' );
728
 
729
+ $target = '_self';
730
 
731
  // Open the album box
732
  wppa_out( '<div' .
1634
  case 'thumbs':
1635
  case 'albums':
1636
  $href_title = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_album_url( $albumid, $linkpage, $linktype ) ) );
1637
+
1638
+ $onclick_title = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
1639
+ wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage, $linktype ) ) . "', '" . $href_title . "' )";
1640
+ $href_title = "#";
1641
+
1642
  break;
1643
  case 'slide':
1644
  $href_title = wppa_convert_to_pretty( wppa_encrypt_url( wppa_get_slideshow_url( $albumid, $linkpage ) ) );
1645
+
1646
  $onclick_title = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
1647
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage, $linktype ) ) . "', '" . $href_title . "' )";
1648
  $href_title = "#";
1649
+
1650
  break;
1651
  case 'none':
1652
  break;
1663
  else {
1664
  $href_title = '#';
1665
  }
1666
+
1667
  if ( $coverphoto ) {
1668
  $onclick_title = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
1669
  wppa_encrypt_url( wppa_get_image_url_ajax_by_id( $coverphoto ) ) . "', '" . $href_title . "' )";
1672
  $onclick_title = '';
1673
  }
1674
  $href_title = "#";
1675
+
1676
  $title_title = _n( 'View the cover photo', 'View the cover photos' , $photocount, 'wp-photo-album-plus');
1677
  }
1678
  }
2058
  // Thumbnails and covers, show sub-album covers
2059
  // in case slideshow is requested on an empty album
2060
  if ( wppa_opt( 'cover_sublinks' ) == 'content' || ! $photocount ) {
2061
+ if ( ! $linkpage ) {
2062
  $href_content = '';
2063
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
2064
  wppa_encrypt_url( wppa_get_album_url_ajax( $albumid, $linkpage ) ) . "', '" .
2073
 
2074
  // Slideshow
2075
  elseif ( wppa_opt( 'cover_sublinks' ) == 'slide' ) {
2076
+ if ( ! $linkpage ) {
2077
  $href_content = '';
2078
  $onclick_content = "wppaDoAjaxRender( " . wppa( 'mocc' ) . ", '" .
2079
  wppa_encrypt_url( wppa_get_slideshow_url_ajax( $albumid, $linkpage ) ) . "', '" .
wppa-breadcrumb.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for breadcrumbs
6
- * Version 7.5.05
7
  *
8
  */
9
 
@@ -650,7 +650,7 @@ global $wppa_lang;
650
 
651
  if ( $href ) {
652
  wppa_out( '<a' .
653
- ( $ajax && wppa_switch( 'allow_ajax' ) ?
654
  ' onclick="wppaDoAjaxRender(' . wppa( 'mocc' ) . ', \'' . $ajax . '\', \'' . $href . '\' );"' :
655
  ' href="' . $href . '"' ) .
656
  ' class="wppa-nav-text ' . $class . '"' .
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for breadcrumbs
6
+ * Version 8.0.00.005
7
  *
8
  */
9
 
650
 
651
  if ( $href ) {
652
  wppa_out( '<a' .
653
+ ( $ajax ?
654
  ' onclick="wppaDoAjaxRender(' . wppa( 'mocc' ) . ', \'' . $ajax . '\', \'' . $href . '\' );"' :
655
  ' href="' . $href . '"' ) .
656
  ' class="wppa-nav-text ' . $class . '"' .
wppa-defaults.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
- * Version 8.0.00.004
7
  *
8
  */
9
 
@@ -478,7 +478,6 @@ horizrailenabled:false,";
478
 
479
  // Table IV: Behaviour
480
  // A System
481
- 'wppa_allow_ajax' => 'yes',
482
  'wppa_ajax_scroll' => 'yes',
483
  'wppa_non_ajax_scroll' => 'no',
484
  'wppa_ajax_render_modal' => 'no',
@@ -555,7 +554,6 @@ horizrailenabled:false,";
555
  'wppa_auto_open_comments' => 'yes',
556
  'wppa_film_hover_goto' => 'no',
557
  'wppa_slide_swipe' => 'no',
558
- 'wppa_slideshow_page_allow_ajax' => 'yes',
559
  'wppa_filmonly_continuous' => 'no',
560
  'wppa_filmonly_random' => 'no',
561
  'wppa_no_animate_on_mobile' => 'no',
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
+ * Version 8.0.00.005
7
  *
8
  */
9
 
478
 
479
  // Table IV: Behaviour
480
  // A System
 
481
  'wppa_ajax_scroll' => 'yes',
482
  'wppa_non_ajax_scroll' => 'no',
483
  'wppa_ajax_render_modal' => 'no',
554
  'wppa_auto_open_comments' => 'yes',
555
  'wppa_film_hover_goto' => 'no',
556
  'wppa_slide_swipe' => 'no',
 
557
  'wppa_filmonly_continuous' => 'no',
558
  'wppa_filmonly_random' => 'no',
559
  'wppa_no_animate_on_mobile' => 'no',
wppa-filter.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
- * Version 8.0.00.003
7
  *
8
  */
9
 
@@ -380,10 +380,6 @@ global $wppa_current_shortcode_atts;
380
  $wppa['is_supersearch'] = true;
381
  break;
382
  case 'calendar':
383
- if ( ! wppa_switch( 'allow_ajax' ) ) {
384
- wppa_dbg_msg ( 'Shortcode [wppa type="(real)calendar" ... requires Ajax acive. See Photo Albums -> Settings Table IV-A1.0', 'red', 'force' );
385
- return '';
386
- }
387
  $wppa['is_calendar'] = true;
388
  $wppa['calendar'] = 'timestamp';
389
  if ( in_array( $atts['calendar'], array( 'exifdtm', 'timestamp', 'modified', 'realexifdtm', 'realtimestamp', 'realmodified' ) ) ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
+ * Version 8.0.00.005
7
  *
8
  */
9
 
380
  $wppa['is_supersearch'] = true;
381
  break;
382
  case 'calendar':
 
 
 
 
383
  $wppa['is_calendar'] = true;
384
  $wppa['calendar'] = 'timestamp';
385
  if ( in_array( $atts['calendar'], array( 'exifdtm', 'timestamp', 'modified', 'realexifdtm', 'realtimestamp', 'realmodified' ) ) ) {
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 8.0.00.003
7
  *
8
  */
9
 
@@ -3713,7 +3713,7 @@ global $blog_id;
3713
  }
3714
 
3715
  // Spinner for Ajax
3716
- if ( wppa_switch( 'allow_ajax' ) && ! wppa_in_widget() ) {
3717
 
3718
  wppa_out( wppa_get_spinner_svg_html( array( 'id' => 'wppa-ajax-spin-' . wppa( 'mocc' ),
3719
  'class' => 'wppa-ajax-spin',
@@ -5211,7 +5211,7 @@ global $wppa_alert;
5211
  $is_av = false;
5212
  }
5213
 
5214
- $status = wppa_opt( 'wppa_status_new' );
5215
  if ( wppa_switch( 'upload_moderate' ) && ! current_user_can( 'wppa_admin' ) ) {
5216
  $status = 'pending';
5217
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 8.0.00.005
7
  *
8
  */
9
 
3713
  }
3714
 
3715
  // Spinner for Ajax
3716
+ if ( ! wppa_in_widget() ) {
3717
 
3718
  wppa_out( wppa_get_spinner_svg_html( array( 'id' => 'wppa-ajax-spin-' . wppa( 'mocc' ),
3719
  'class' => 'wppa-ajax-spin',
5211
  $is_av = false;
5212
  }
5213
 
5214
+ $status = wppa_opt( 'status_new' );
5215
  if ( wppa_switch( 'upload_moderate' ) && ! current_user_can( 'wppa_admin' ) ) {
5216
  $status = 'pending';
5217
  }
wppa-links.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
- * Version 8.0.00.003
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -1268,90 +1268,30 @@ global $previous_page_last_id;
1268
  $result .=
1269
  '<div' .
1270
  ' style="float:left;text-align:left;'.$vis.'"' .
1271
- ' >';
1272
-
1273
- if ( wppa_switch( 'allow_ajax') ) {
1274
- $result .=
1275
- '<a' .
1276
- ' style="cursor:pointer;"' .
1277
- ' title="' . esc_attr( __( 'Previous page', 'wp-photo-album-plus' ) ) . '"' .
1278
- ' onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . ( $curpage - 1 ) . '\', \'' . wppa_convert_to_pretty ( $link_url . '&amp;wppa-page=' . ( $curpage - 1 ) ) . '\' )"' .
1279
- ' >' .
1280
- wppa_get_svghtml( 'Prev-Button', $iconsize ) .
1281
- '</a>';
1282
- }
1283
- else {
1284
- $result .=
1285
- '<a' .
1286
- ' style="cursor:pointer;"' .
1287
- ' title="' . esc_attr( __( 'Previous page', 'wp-photo-album-plus' ) ) . '"' .
1288
- ' href="' . $link_url . '&amp;wppa-page=' . ( $curpage - 1 ) . '"' .
1289
- ' >' .
1290
- wppa_get_svghtml( 'Prev-Button', $iconsize ) .
1291
- '</a>';
1292
- }
1293
- $result .=
1294
- '</div><!-- #prev-page -->';
1295
 
1296
  $vis = $curpage == $npages ? 'visibility: hidden;' : '';
1297
  $result .=
1298
- '<div' .
1299
- ' style="float:right;text-align:right;' . $vis . '"' .
1300
- ' >';
1301
- if ( wppa_switch( 'allow_ajax') ) {
1302
- $result .=
1303
- '<a' .
1304
- ' id="wppa-next-pagelink-' . $mocc . '"' .
1305
- ' style="cursor:pointer;"' .
1306
- ' title="' . esc_attr( __( 'Next page', 'wp-photo-album-plus' ) ) . '"' .
1307
- ' onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . ( $curpage + 1 ) . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . ( $curpage + 1 ) ) . '\')"' .
1308
- ' >' .
1309
- wppa_get_svghtml( 'Next-Button', $iconsize ) .
1310
- '</a>';
1311
- /*
1312
- // A hidden 'first page' link for wrapping from last to first page in a wrapping slideshow
1313
- // and a hidden link to the last item of the previous page for scrolling prev through page boundry
1314
- if ( wppa( 'is_slide' ) ) $result .= '
1315
- <a
1316
- id="wppa-first-pagelink-' . $mocc . '"
1317
- onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=1\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=1' ) . '\')"
1318
- >
1319
- </a>
1320
- <a
1321
- id="wppa-prev-page-last-item"
1322
- onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-photo=' . $previous_page_last_id . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-photo=' . $previous_page_last_id ) . '\')"
1323
- >
1324
- </a>';
1325
- */
1326
- }
1327
- else {
1328
- $result .=
1329
- '<a' .
1330
- ' id="wppa-next-pagelink-' . $mocc . '"' .
1331
- ' style="cursor:pointer;"' .
1332
- ' href="' . $link_url . '&amp;wppa-page=' . ( $curpage + 1 ) . '"' .
1333
- ' >' .
1334
- wppa_get_svghtml( 'Next-Button', $iconsize ) .
1335
- '</a>';
1336
- /*
1337
- // A hidden 'first page' link for wrapping from last to first page in a wrapping slideshow
1338
- // and a hidden link to the last item of the previous page for scrolling prev through page boundry
1339
- if ( wppa( 'is_slide' ) ) $result .= '
1340
- <a
1341
- id="wppa-first-pagelink-' . $mocc . '"
1342
- onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=1\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=1' ) . '\')"
1343
- >
1344
- </a>
1345
- <a
1346
- id="wppa-prev-page-last-item"
1347
- onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-photo=' . $previous_page_last_id . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-photo=' . $previous_page_last_id ) . '\')"
1348
- >
1349
- </a>';
1350
- */
1351
- }
1352
-
1353
- $result .=
1354
- '</div><!-- #next-page -->';
1355
 
1356
  // The numbered pagelinks ?
1357
  if ( wppa_opt( 'pagelinks_max' ) ) {
@@ -1373,27 +1313,16 @@ global $previous_page_last_id;
1373
  '<div' .
1374
  ' class="wppa-mini-box wppa-even"' .
1375
  ' style="display:inline;text-align:center;' . wppa_wcs( 'wppa-mini-box' ) . wppa_wcs( 'wppa-even' ) .'"' .
1376
- ' >';
1377
- if ( ( ! $slide && wppa_switch( 'allow_ajax') ) || ( $slide && wppa_switch( 'slideshow_page_allow_ajax') ) ) {
1378
- $result .=
1379
- '<a' .
1380
- ' id="wppa-pagelink-' . $mocc . '-' . $i . '"' .
1381
- ' style="cursor:pointer;"' .
1382
- ' onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . $i . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . $i ) . '\')"' .
1383
- ' >' .
1384
- '&nbsp;' . $i . '&nbsp;' .
1385
- '</a>';
1386
- }
1387
- else {
1388
- $result .=
1389
- '<a' .
1390
- ' id="wppa-pagelink-' . $mocc . '-' . $i . '"' .
1391
- ' style="cursor:pointer;"' .
1392
- ' href="' . $link_url . '&amp;wppa-page=' . $i . '"' .
1393
- ' >' .
1394
- '&nbsp;' . $i . '&nbsp;' .
1395
- '</a>';
1396
- }
1397
  $result .=
1398
  '</div>';
1399
  }
@@ -1446,91 +1375,33 @@ global $previous_page_last_id;
1446
  >
1447
  <span
1448
  class="wppa-arrow"
1449
- style="' . wppa_wcs( 'wppa-arrow' ) . 'cursor:default;" >&laquo;&nbsp;</span
1450
- >';
1451
- if ( wppa_switch( 'allow_ajax' ) ) {
1452
- $result .= '
1453
- <a
1454
- style="cursor:pointer;"
1455
- onclick="wppaDoAjaxRender(' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . ( $curpage - 1 ) . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . ( $curpage - 1 ) ) . '\')"
1456
- >' .
1457
- __( 'Previous', 'wp-photo-album-plus' ) . '
1458
- </a>';
1459
- }
1460
- else {
1461
- $result .= '
1462
- <a
1463
- style="cursor:pointer;"
1464
- href="' . $link_url . '&amp;wppa-page=' . ( $curpage - 1 ) . '" >' .
1465
- __( 'Previous', 'wp-photo-album-plus' ) . '
1466
- </a>';
1467
- }
1468
- $result .= '
1469
  </div><!-- #prev-page -->';
1470
 
1471
  $vis = $curpage == $npages ? 'visibility: hidden;' : '';
1472
  $result .= '
1473
  <div
1474
  style="float:right; text-align:right; ' . $vis . '"
1475
- >';
1476
- if ( wppa_switch( 'allow_ajax') ) {
1477
- $result .= '
1478
- <a
1479
- id="wppa-next-pagelink-' . $mocc . '"
1480
- style="cursor:pointer;"
1481
- onclick="wppaDoAjaxRender(' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . ( $curpage + 1 ) . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . ( $curpage + 1 ) ) . '\')"
1482
- >' .
1483
- __( 'Next', 'wp-photo-album-plus' ) . '
1484
- </a>';
1485
- /*
1486
- // A hidden 'first page' link for wrapping from last to first page in a wrapping slideshow
1487
- // and a hidden link to the last item of the previous page for scrolling prev through page boundry
1488
- if ( wppa( 'is_slide' ) ) $result .= '
1489
- <a
1490
- id="wppa-first-pagelink-' . $mocc . '"
1491
- onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=1\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=1' ) . '\')"
1492
- >
1493
- </a>
1494
- <a
1495
- id="wppa-prev-page-last-item"
1496
- onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-photo=' . $previous_page_last_id . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-photo=' . $previous_page_last_id ) . '\')"
1497
- >
1498
- </a>';
1499
- */
1500
- }
1501
- else {
1502
- $result .= '
1503
- <a
1504
- id="wppa-next-pagelink-' . $mocc . '"
1505
- style="cursor:pointer;"
1506
- href="' . $link_url . '&amp;wppa-page=' . ( $curpage + 1 ) . '"
1507
- >' .
1508
- __( 'Next', 'wp-photo-album-plus' ) . '
1509
- </a>';
1510
- /*
1511
- // A hidden 'first page' link for wrapping from last to first page in a wrapping slideshow
1512
- // and a hidden link to the last item of the previous page for scrolling prev through page boundry
1513
- if ( wppa( 'is_slide' ) ) $result .= '
1514
- <a
1515
- id="wppa-first-pagelink-' . $mocc . '"
1516
- onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=1\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=1' ) . '\')"
1517
- >
1518
- </a>
1519
- <a
1520
- id="wppa-prev-page-last-item"
1521
- onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-photo=' . $previous_page_last_id . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-photo=' . $previous_page_last_id ) . '\')"
1522
- >
1523
- </a>';
1524
- */
1525
- }
1526
-
1527
- $result .= '
1528
- <span
1529
- class="wppa-arrow"
1530
- style="' . wppa_wcs( 'wppa-arrow' ) . 'cursor:default;" >&nbsp;&raquo;</span
1531
- >
1532
-
1533
- </div><!-- #next-page -->';
1534
 
1535
  // The numbered pagelinks ?
1536
  if ( wppa_opt( 'pagelinks_max' ) ) {
@@ -1551,25 +1422,13 @@ global $previous_page_last_id;
1551
  <div
1552
  class="wppa-mini-box wppa-even"
1553
  style="display:inline; text-align:center; ' . wppa_wcs( 'wppa-mini-box' ) . wppa_wcs( 'wppa-even' ) . '"
1554
- >';
1555
- if ( ( ! $slide && wppa_switch( 'allow_ajax') ) || ( $slide && wppa_switch( 'slideshow_page_allow_ajax') ) ) {
1556
- $result .= '
1557
- <a
1558
- id="wppa-pagelink-' . $mocc . '-' . $i . '"
1559
- style="cursor:pointer;"
1560
- onclick="wppaDoAjaxRender(' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . $i . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . $i ) . '\')"
1561
- >&nbsp;'.$i.'&nbsp;</a
1562
- >';
1563
- }
1564
- else {
1565
- $result .= '
1566
- <a
1567
- id="wppa-pagelink-' . $mocc . '-' . $i . '"
1568
- style="cursor:pointer;"
1569
- href="' . $link_url . '&amp;wppa-page=' . $i . '">&nbsp;' . $i . '&nbsp;</a
1570
- >';
1571
- }
1572
- $result .= '
1573
  </div>';
1574
  }
1575
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
+ * Version 8.0.00.005
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
1268
  $result .=
1269
  '<div' .
1270
  ' style="float:left;text-align:left;'.$vis.'"' .
1271
+ ' >
1272
+ <a' .
1273
+ ' style="cursor:pointer;"' .
1274
+ ' title="' . esc_attr( __( 'Previous page', 'wp-photo-album-plus' ) ) . '"' .
1275
+ ' onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . ( $curpage - 1 ) . '\', \'' . wppa_convert_to_pretty ( $link_url . '&amp;wppa-page=' . ( $curpage - 1 ) ) . '\' )"' .
1276
+ ' >' .
1277
+ wppa_get_svghtml( 'Prev-Button', $iconsize ) .
1278
+ '</a>
1279
+ </div><!-- #prev-page -->';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1280
 
1281
  $vis = $curpage == $npages ? 'visibility: hidden;' : '';
1282
  $result .=
1283
+ '<div
1284
+ style="float:right;text-align:right;' . $vis . '"
1285
+ >
1286
+ <a' .
1287
+ ' id="wppa-next-pagelink-' . $mocc . '"' .
1288
+ ' style="cursor:pointer;"' .
1289
+ ' title="' . esc_attr( __( 'Next page', 'wp-photo-album-plus' ) ) . '"' .
1290
+ ' onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . ( $curpage + 1 ) . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . ( $curpage + 1 ) ) . '\')"' .
1291
+ ' >' .
1292
+ wppa_get_svghtml( 'Next-Button', $iconsize ) .
1293
+ '</a>
1294
+ </div><!-- #next-page -->';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1295
 
1296
  // The numbered pagelinks ?
1297
  if ( wppa_opt( 'pagelinks_max' ) ) {
1313
  '<div' .
1314
  ' class="wppa-mini-box wppa-even"' .
1315
  ' style="display:inline;text-align:center;' . wppa_wcs( 'wppa-mini-box' ) . wppa_wcs( 'wppa-even' ) .'"' .
1316
+ ' >' .
1317
+
1318
+ '<a' .
1319
+ ' id="wppa-pagelink-' . $mocc . '-' . $i . '"' .
1320
+ ' style="cursor:pointer;"' .
1321
+ ' onclick="wppaDoAjaxRender( ' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . $i . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . $i ) . '\')"' .
1322
+ ' >' .
1323
+ '&nbsp;' . $i . '&nbsp;' .
1324
+ '</a>';
1325
+
 
 
 
 
 
 
 
 
 
 
 
1326
  $result .=
1327
  '</div>';
1328
  }
1375
  >
1376
  <span
1377
  class="wppa-arrow"
1378
+ style="' . wppa_wcs( 'wppa-arrow' ) . 'cursor:default;" >&laquo;&nbsp;
1379
+ </span>
1380
+ <a
1381
+ style="cursor:pointer;"
1382
+ onclick="wppaDoAjaxRender(' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . ( $curpage - 1 ) . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . ( $curpage - 1 ) ) . '\')"
1383
+ >' .
1384
+ __( 'Previous', 'wp-photo-album-plus' ) . '
1385
+ </a>
 
 
 
 
 
 
 
 
 
 
 
 
1386
  </div><!-- #prev-page -->';
1387
 
1388
  $vis = $curpage == $npages ? 'visibility: hidden;' : '';
1389
  $result .= '
1390
  <div
1391
  style="float:right; text-align:right; ' . $vis . '"
1392
+ >
1393
+ <a
1394
+ id="wppa-next-pagelink-' . $mocc . '"
1395
+ style="cursor:pointer;"
1396
+ onclick="wppaDoAjaxRender(' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . ( $curpage + 1 ) . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . ( $curpage + 1 ) ) . '\')"
1397
+ >' .
1398
+ __( 'Next', 'wp-photo-album-plus' ) . '
1399
+ </a>
1400
+ <span
1401
+ class="wppa-arrow"
1402
+ style="' . wppa_wcs( 'wppa-arrow' ) . 'cursor:default;" >&nbsp;&raquo;</span
1403
+ >
1404
+ </div><!-- #next-page -->';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1405
 
1406
  // The numbered pagelinks ?
1407
  if ( wppa_opt( 'pagelinks_max' ) ) {
1422
  <div
1423
  class="wppa-mini-box wppa-even"
1424
  style="display:inline; text-align:center; ' . wppa_wcs( 'wppa-mini-box' ) . wppa_wcs( 'wppa-even' ) . '"
1425
+ >
1426
+ <a
1427
+ id="wppa-pagelink-' . $mocc . '-' . $i . '"
1428
+ style="cursor:pointer;"
1429
+ onclick="wppaDoAjaxRender(' . wppa( 'mocc' ) . ', \'' . $ajax_url . '&amp;wppa-page=' . $i . '\', \'' . wppa_convert_to_pretty( $link_url . '&amp;wppa-page=' . $i ) . '\')"
1430
+ >&nbsp;'.$i.'&nbsp;</a
1431
+ >
 
 
 
 
 
 
 
 
 
 
 
 
1432
  </div>';
1433
  }
1434
  }
wppa-non-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
- * Version 8.0.00.004
7
  *
8
  */
9
 
@@ -338,15 +338,9 @@ global $wppa_opt;
338
 
339
  // Panorama
340
  if ( wppa_switch( 'enable_panorama' ) ) {
341
-
342
- // Only if either in header or in footer and panorama's on the page found or ajax enabled
343
- if ( ! wppa_switch( 'defer_javascript' ) || ( wppa( 'has_panorama' ) || wppa_switch( 'allow_ajax' ) ) ) {
344
-
345
- $three_url = WPPA_URL . '/vendor/three/three.min.js';
346
- $ver = '122';
347
-
348
- wp_enqueue_script( 'wppa-three-min-js', $three_url, array(), $ver );
349
- }
350
  }
351
 
352
  // End other (vendor) js files
@@ -586,7 +580,7 @@ global $wppa_session;
586
  }
587
 
588
  // Window nicescroller
589
- if ( wppa_switch( 'nicescroll_window' ) ) {
590
  echo '
591
  <!-- Nice scroller on window, by wppa -->
592
  ' . wppa_js(
@@ -915,7 +909,7 @@ wppaNextOnCallback = '.( wppa_switch( 'next_on_callback') ? 'true' : 'false' ).'
915
  wppaStarOpacity = '.str_replace(',', '.',( wppa_opt( 'star_opacity' )/'100' )).';
916
  wppaEmailRequired = "'.wppa_opt( 'comment_email_required').'";
917
  wppaSlideBorderWidth = '.$fbw.';
918
- wppaAllowAjax = '.( wppa_switch( 'allow_ajax') ? 'true' : 'false' ).';
919
  wppaUsePhotoNamesInUrls = '.( wppa_switch( 'use_photo_names_in_urls') ? 'true' : 'false' ).';
920
  wppaThumbTargetBlank = '.( wppa_switch( 'thumb_blank') ? 'true' : 'false' ).';
921
  wppaRatingMax = '.wppa_opt( 'rating_max' ).';
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the non admin stuff
6
+ * Version 8.0.00.005
7
  *
8
  */
9
 
338
 
339
  // Panorama
340
  if ( wppa_switch( 'enable_panorama' ) ) {
341
+ $three_url = WPPA_URL . '/vendor/three/three.min.js';
342
+ $ver = '122';
343
+ wp_enqueue_script( 'wppa-three-min-js', $three_url, array(), $ver );
 
 
 
 
 
 
344
  }
345
 
346
  // End other (vendor) js files
580
  }
581
 
582
  // Window nicescroller
583
+ if ( wppa_switch( 'nicescroll_window' ) && ! wppa_is_mobile() ) {
584
  echo '
585
  <!-- Nice scroller on window, by wppa -->
586
  ' . wppa_js(
909
  wppaStarOpacity = '.str_replace(',', '.',( wppa_opt( 'star_opacity' )/'100' )).';
910
  wppaEmailRequired = "'.wppa_opt( 'comment_email_required').'";
911
  wppaSlideBorderWidth = '.$fbw.';
912
+ wppaAllowAjax = true;
913
  wppaUsePhotoNamesInUrls = '.( wppa_switch( 'use_photo_names_in_urls') ? 'true' : 'false' ).';
914
  wppaThumbTargetBlank = '.( wppa_switch( 'thumb_blank') ? 'true' : 'false' ).';
915
  wppaRatingMax = '.wppa_opt( 'rating_max' ).';
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 8.0.00.004
7
  *
8
  */
9
 
@@ -3789,15 +3789,6 @@ global $wppa_supported_camara_brands;
3789
 
3790
  wppa_setting_subheader( 'A', '1', __( 'System related settings' , 'wp-photo-album-plus') );
3791
  {
3792
- $name = __('Use Ajax', 'wp-photo-album-plus');
3793
- $desc = __('Use Ajax as much as is possible and implemented.', 'wp-photo-album-plus');
3794
- $help = (__('If this box is ticked, page content updates from within wppa+ displays will be Ajax based as much as possible.', 'wp-photo-album-plus'));
3795
- $slug = 'wppa_allow_ajax';
3796
- $onchange = 'wppaCheckAjax()';
3797
- $html = wppa_checkbox($slug, $onchange);
3798
- $clas = '';
3799
- $tags = 'system';
3800
- wppa_setting($slug, '1.0', $name, $desc, $html, $help, $clas, $tags);
3801
 
3802
  $name = __('Modal boxes', 'wp-photo-album-plus');
3803
  $desc = __('Place Ajax rendered content in modal boxes', 'wp-photo-album-plus');
@@ -4534,15 +4525,6 @@ global $wppa_supported_camara_brands;
4534
  $tags = 'slide,system';
4535
  wppa_setting($slug, '14', $name, $desc, $html, $help, $clas, $tags);
4536
 
4537
- $name = __('Slide page Ajax', 'wp-photo-album-plus');
4538
- $desc = __('Pagelinks slideshow use Ajax', 'wp-photo-album-plus');
4539
- $help = __('On some systems you need to disable ajax here.', 'wp-photo-album-plus');
4540
- $slug = 'wppa_slideshow_page_allow_ajax';
4541
- $html = wppa_checkbox($slug);
4542
- $clas = '';
4543
- $tags = 'slide,system';
4544
- wppa_setting($slug, '15', $name, $desc, $html, $help, $clas, $tags);
4545
-
4546
  $name = __('Filmonly continu', 'wp-photo-album-plus');
4547
  $desc = __('The filmstrip will move almost continously', 'wp-photo-album-plus');
4548
  $help = '';
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 8.0.00.005
7
  *
8
  */
9
 
3789
 
3790
  wppa_setting_subheader( 'A', '1', __( 'System related settings' , 'wp-photo-album-plus') );
3791
  {
 
 
 
 
 
 
 
 
 
3792
 
3793
  $name = __('Modal boxes', 'wp-photo-album-plus');
3794
  $desc = __('Place Ajax rendered content in modal boxes', 'wp-photo-album-plus');
4525
  $tags = 'slide,system';
4526
  wppa_setting($slug, '14', $name, $desc, $html, $help, $clas, $tags);
4527
 
 
 
 
 
 
 
 
 
 
4528
  $name = __('Filmonly continu', 'wp-photo-album-plus');
4529
  $desc = __('The filmstrip will move almost continously', 'wp-photo-album-plus');
4530
  $help = '';
wppa-thumbnails.php CHANGED
@@ -5,7 +5,7 @@
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
- * Version 7.7.06.002
9
  *
10
  */
11
 
@@ -195,8 +195,7 @@ global $wpdb;
195
 
196
  // Is link an url?
197
  if ( $link['is_url'] ) {
198
- if ( wppa_switch( 'allow_ajax' )
199
- && wppa_opt( 'thumb_linktype' ) == 'photo' // linktype must be to slideshow image
200
  && wppa_opt( 'thumb_linkpage' ) == '0' // same page/post
201
  && ! wppa_switch( 'thumb_blank' ) // not on a new tab
202
  && ! ( wppa_switch( 'thumb_overrule' ) && $thumb['linkurl'] ) // no ( ps overrule set AND link present )
@@ -1249,8 +1248,7 @@ global $wpdb;
1249
  // See if ajax possible
1250
  if ( $link ) {
1251
  if ( $link['is_url'] ) { // is url
1252
- if ( wppa_switch( 'allow_ajax' )
1253
- && wppa_opt( 'thumb_linktype' ) == 'photo' // linktype must be to slideshow image
1254
  && wppa_opt( 'thumb_linkpage' ) == '0' // same page/post
1255
  && ! wppa_switch( 'thumb_blank' ) // not on a new tab
1256
  && ! ( wppa_switch( 'thumb_overrule' ) && $thumb['linkurl'] ) // no ( ps overrule set AND link present )
5
  * Various funcions to display a thumbnail image
6
  * Contains all possible frontend thumbnail types
7
  *
8
+ * Version 8.0.00.005
9
  *
10
  */
11
 
195
 
196
  // Is link an url?
197
  if ( $link['is_url'] ) {
198
+ if ( wppa_opt( 'thumb_linktype' ) == 'photo' // linktype must be to slideshow image
 
199
  && wppa_opt( 'thumb_linkpage' ) == '0' // same page/post
200
  && ! wppa_switch( 'thumb_blank' ) // not on a new tab
201
  && ! ( wppa_switch( 'thumb_overrule' ) && $thumb['linkurl'] ) // no ( ps overrule set AND link present )
1248
  // See if ajax possible
1249
  if ( $link ) {
1250
  if ( $link['is_url'] ) { // is url
1251
+ if ( wppa_opt( 'thumb_linktype' ) == 'photo' // linktype must be to slideshow image
 
1252
  && wppa_opt( 'thumb_linkpage' ) == '0' // same page/post
1253
  && ! wppa_switch( 'thumb_blank' ) // not on a new tab
1254
  && ! ( wppa_switch( 'thumb_overrule' ) && $thumb['linkurl'] ) // no ( ps overrule set AND link present )
wppa.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
- * Version: 8.0.00.004
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
@@ -24,7 +24,7 @@ global $wp_version;
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
- $wppa_api_version = '8.0.00.004'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30
 
2
  /*
3
  * Plugin Name: WP Photo Album Plus
4
  * Description: Easily manage and display your photo albums and slideshows within your WordPress site.
5
+ * Version: 8.0.00.005
6
  * Author: J.N. Breetvelt a.k.a. OpaJaap
7
  * Author URI: http://wppa.opajaap.nl/
8
  * Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
24
 
25
  /* WPPA GLOBALS */
26
  global $wppa_api_version;
27
+ $wppa_api_version = '8.0.00.005'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30