Page scroll to id - Version 1.7.2

Version Description

  • Added an extended "Verify target position and readjust scrolling" option for lazy-load images, iframes, changes in document's length etc.
  • Added "Force scroll type/easing" option for dealing with conflicts with outdated easing libraries added by themes or other plugins.
  • Updated plugin's settings page, contextual help and notices.
Download this release

Release Info

Developer malihu
Plugin Icon 128x128 Page scroll to id
Version 1.7.2
Comparing to
See all releases

Code changes from version 1.7.1 to 1.7.2

css/admin.css CHANGED
@@ -152,7 +152,8 @@
152
  }
153
 
154
  .plugin-body-section-2{
155
- display: block;
 
156
  min-height: 100px;
157
  right: 0;
158
  top: 0;
@@ -165,9 +166,10 @@
165
  }
166
 
167
  @media only screen and (min-width: 480px){
168
- .plugin-body-section-1{
 
169
  margin-right: calc(35vw + 1em);
170
- }
171
 
172
  .plugin-body-section-2{
173
  position: absolute;
@@ -177,9 +179,10 @@
177
  }
178
 
179
  @media only screen and (min-width: 782px){
180
- .plugin-body-section-1{
 
181
  margin-right: calc(25vw + 1em);
182
- }
183
 
184
  .plugin-body-section-2{
185
  width: 25vw;
152
  }
153
 
154
  .plugin-body-section-2{
155
+ /* display: block; */ /* plugin settings banner on */
156
+ display: none; /* plugin settings banner off */
157
  min-height: 100px;
158
  right: 0;
159
  top: 0;
166
  }
167
 
168
  @media only screen and (min-width: 480px){
169
+ /* plugin settings banner on */
170
+ /* .plugin-body-section-1{
171
  margin-right: calc(35vw + 1em);
172
+ } */
173
 
174
  .plugin-body-section-2{
175
  position: absolute;
179
  }
180
 
181
  @media only screen and (min-width: 782px){
182
+ /* plugin settings banner on */
183
+ /* .plugin-body-section-1{
184
  margin-right: calc(25vw + 1em);
185
+ } */
186
 
187
  .plugin-body-section-2{
188
  width: 25vw;
includes/admin.php CHANGED
@@ -81,8 +81,7 @@ $toggle_instance_title=__('Click to toggle', $this->plugin_slug);
81
  </div>
82
 
83
  <div class="plugin-body-section-2">
84
- <?php // SEO notice --edit-- ?>
85
- <a href="https://seobuddy.com/seo-checklist/pagescroll" target="_blank"><img src="<?php echo plugins_url('seo-checklist-illustration-3-opt.png', __FILE__); ?>" /></a>
86
  </div>
87
 
88
  </div>
81
  </div>
82
 
83
  <div class="plugin-body-section-2">
84
+ <!-- plugin settings banner -->
 
85
  </div>
86
 
87
  </div>
includes/help/plugin-settings.inc CHANGED
@@ -19,13 +19,15 @@ $help_plugin_settings_text=<<<EOD
19
  <p>
20
  <a href="http://manos.malihu.gr/page-scroll-to-id-for-wordpress/#plugin-settings-scroll-type-easing" target="_blank"><strong>Scroll type/easing</strong></a> -
21
  Scroll animation easing type (i.e. the way the animation progresses at different points within its duration). <a href="http://manos.malihu.gr/page-scroll-to-id-for-wordpress/#ps2id-duration-easings-demo" target="_blank">Click here to see a visual representation &amp; demo of all easing types</a>. <br />
 
22
  </p>
23
 
24
  <p>
25
  <a href="http://manos.malihu.gr/page-scroll-to-id-for-wordpress/#plugin-settings-scroll-behavior" target="_blank"><strong>Scroll behavior</strong></a> -
26
  <a href="http://manos.malihu.gr/page-scroll-to-id-for-wordpress/#plugin-settings-always-scroll-smoothly" target="_blank">Always scroll smoothly when reaching the end of the page/document</a> option adjusts scroll-to position so it does not exceed document length. <br />
27
  Enable <a href="http://manos.malihu.gr/page-scroll-to-id-for-wordpress/#plugin-settings-stop-scroll-on-event" target="_blank">Stop page scrolling on mouse-wheel or touch-swipe</a> if you want to stop page scrolling when the user tries to scroll the page manually (e.g. via mouse-wheel or touch-swipe). <br />
28
- Enabling <a href="http://manos.malihu.gr/page-scroll-to-id-for-wordpress/#plugin-settings-autocorrect-scroll" target="_blank">Verify target position and readjust scrolling (if necessary), after scrolling animation is complete</a> option, will auto-correct scrolling if the target’s position was changed while the page was scrolling.
 
29
  </p>
30
 
31
  <p>
19
  <p>
20
  <a href="http://manos.malihu.gr/page-scroll-to-id-for-wordpress/#plugin-settings-scroll-type-easing" target="_blank"><strong>Scroll type/easing</strong></a> -
21
  Scroll animation easing type (i.e. the way the animation progresses at different points within its duration). <a href="http://manos.malihu.gr/page-scroll-to-id-for-wordpress/#ps2id-duration-easings-demo" target="_blank">Click here to see a visual representation &amp; demo of all easing types</a>. <br />
22
+ Enable <a href="http://manos.malihu.gr/page-scroll-to-id-for-wordpress/#plugin-settings-force-scroll-easing" target="_blank">Force scroll type/easing</a> if the selected animation easing does not seem to take effect (this can happen when there's conflict with outdated easing libraries added by themes or other plugins.
23
  </p>
24
 
25
  <p>
26
  <a href="http://manos.malihu.gr/page-scroll-to-id-for-wordpress/#plugin-settings-scroll-behavior" target="_blank"><strong>Scroll behavior</strong></a> -
27
  <a href="http://manos.malihu.gr/page-scroll-to-id-for-wordpress/#plugin-settings-always-scroll-smoothly" target="_blank">Always scroll smoothly when reaching the end of the page/document</a> option adjusts scroll-to position so it does not exceed document length. <br />
28
  Enable <a href="http://manos.malihu.gr/page-scroll-to-id-for-wordpress/#plugin-settings-stop-scroll-on-event" target="_blank">Stop page scrolling on mouse-wheel or touch-swipe</a> if you want to stop page scrolling when the user tries to scroll the page manually (e.g. via mouse-wheel or touch-swipe). <br />
29
+ Enabling <a href="http://manos.malihu.gr/page-scroll-to-id-for-wordpress/#plugin-settings-autocorrect-scroll" target="_blank">Verify target position and readjust scrolling (if necessary), after scrolling animation is complete</a> option, will auto-correct scrolling if the target’s position was changed while the page was scrolling. <br />
30
+ If you need to extend the above option for issues with lazy-load images, iframes, changes in document's length etc., enable <a href="http://manos.malihu.gr/page-scroll-to-id-for-wordpress/#plugin-settings-autocorrect-scroll-extend" target="_blank">Extend target position verification and scrolling adjustment for lazy-load scripts (images, iframes etc.) and changes in document's length</a>.
31
  </p>
32
 
33
  <p>
js/jquery.malihu.PageScroll2id-init.js CHANGED
@@ -3,6 +3,7 @@
3
  _o=mPS2id_params,
4
  shortcodeClass=_o.shortcode_class, //shortcode without suffix
5
  _hash=location.hash || null,
 
6
  _validateLocHash=function(val,forAll){
7
  try{ var $val=$(val); }catch(error){ return false; } //avoid js errors on invalid selectors
8
  return $(val).length && (forAll || $("a[href*='"+val+"']").filter(function(){return $(this).data(_p+"Element")==true}).length);
@@ -107,7 +108,8 @@
107
  console.log("ps2id excluded selector issue: a[href*=#]:not([href=#]) selector needs quotes");
108
  }
109
  var sel=$(_o.instances[_p+"_instance_"+i]["selector"]+",."+shortcodeClass+","+autoSelectors),
110
- autoCorrectScrollOpt=_o.instances[_p+"_instance_"+i]["autoCorrectScroll"],autoCorrectScroll=0;
 
111
  //1.6.7
112
  //ps2id special parameters (these overwrite the ones in plugin settings)
113
  //usage: <script>window.ps2id_special_params={ scrollSpeed: 500 }</script>
@@ -126,8 +128,8 @@
126
  sel.mPageScroll2id({
127
  scrollSpeed:_o.instances[_p+"_instance_"+i]["scrollSpeed"],
128
  autoScrollSpeed:(_o.instances[_p+"_instance_"+i]["autoScrollSpeed"]==="true") ? true : false,
129
- scrollEasing:_o.instances[_p+"_instance_"+i]["scrollEasing"],
130
- scrollingEasing:_o.instances[_p+"_instance_"+i]["scrollingEasing"],
131
  pageEndSmoothScroll:(_o.instances[_p+"_instance_"+i]["pageEndSmoothScroll"]==="true") ? true : false,
132
  layout:_o.instances[_p+"_instance_"+i]["layout"],
133
  offset:_offset(_o.instances[_p+"_instance_"+i]["offset"].toString()),
@@ -142,11 +144,22 @@
142
  appendHash:(_o.instances[_p+"_instance_"+i]["appendHash"]==="true") ? true : false,
143
  onStart:function(){
144
  if(autoCorrectScrollOpt==="true" && mPS2id.trigger==="selector") autoCorrectScroll++;
 
145
  },
146
  onComplete:function(){
147
- if(autoCorrectScroll==1){
148
- if(mPS2id.clicked.length) mPS2id.clicked.trigger("click.mPS2id");
149
- autoCorrectScroll=0;
 
 
 
 
 
 
 
 
 
 
150
  }
151
  },
152
  excludeSelectors:_o.instances[_p+"_instance_"+i]["excludeSelector"],
@@ -223,4 +236,107 @@
223
  return val.substr(0,1)===">" ? $(a).height()>val.substr(1) : val.substr(0,1)==="<" ? $(a).height()<val.substr(1) : $(a).height()===parseInt(val);
224
  }
225
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  })(jQuery);
3
  _o=mPS2id_params,
4
  shortcodeClass=_o.shortcode_class, //shortcode without suffix
5
  _hash=location.hash || null,
6
+ _targetPosition,
7
  _validateLocHash=function(val,forAll){
8
  try{ var $val=$(val); }catch(error){ return false; } //avoid js errors on invalid selectors
9
  return $(val).length && (forAll || $("a[href*='"+val+"']").filter(function(){return $(this).data(_p+"Element")==true}).length);
108
  console.log("ps2id excluded selector issue: a[href*=#]:not([href=#]) selector needs quotes");
109
  }
110
  var sel=$(_o.instances[_p+"_instance_"+i]["selector"]+",."+shortcodeClass+","+autoSelectors),
111
+ autoCorrectScrollOpt=_o.instances[_p+"_instance_"+i]["autoCorrectScroll"],autoCorrectScroll=0,
112
+ autoCorrectScrollExtOpt=_o.instances[_p+"_instance_"+i]["autoCorrectScrollExtend"];
113
  //1.6.7
114
  //ps2id special parameters (these overwrite the ones in plugin settings)
115
  //usage: <script>window.ps2id_special_params={ scrollSpeed: 500 }</script>
128
  sel.mPageScroll2id({
129
  scrollSpeed:_o.instances[_p+"_instance_"+i]["scrollSpeed"],
130
  autoScrollSpeed:(_o.instances[_p+"_instance_"+i]["autoScrollSpeed"]==="true") ? true : false,
131
+ scrollEasing:(_o.instances[_p+"_instance_"+i]["forceScrollEasing"]==="true") ? "ps2id_"+_o.instances[_p+"_instance_"+i]["scrollEasing"] : _o.instances[_p+"_instance_"+i]["scrollEasing"],
132
+ scrollingEasing:(_o.instances[_p+"_instance_"+i]["forceScrollEasing"]==="true") ? "ps2id_"+_o.instances[_p+"_instance_"+i]["scrollingEasing"] : _o.instances[_p+"_instance_"+i]["scrollingEasing"],
133
  pageEndSmoothScroll:(_o.instances[_p+"_instance_"+i]["pageEndSmoothScroll"]==="true") ? true : false,
134
  layout:_o.instances[_p+"_instance_"+i]["layout"],
135
  offset:_offset(_o.instances[_p+"_instance_"+i]["offset"].toString()),
144
  appendHash:(_o.instances[_p+"_instance_"+i]["appendHash"]==="true") ? true : false,
145
  onStart:function(){
146
  if(autoCorrectScrollOpt==="true" && mPS2id.trigger==="selector") autoCorrectScroll++;
147
+ if(autoCorrectScrollExtOpt==="true") _targetPosition=[mPS2id.target.offset().top,mPS2id.target.offset().left];
148
  },
149
  onComplete:function(){
150
+ if(autoCorrectScrollExtOpt==="true"){
151
+ if((_targetPosition[0] !== mPS2id.target.offset().top) || (_targetPosition[1] !== mPS2id.target.offset().left)){
152
+ if(mPS2id.trigger === "selector" && mPS2id.clicked.length){
153
+ mPS2id.clicked.trigger("click.mPS2id");
154
+ }else{
155
+ $.mPageScroll2id("scrollTo",mPS2id.target.attr("id"));
156
+ }
157
+ }
158
+ }else{
159
+ if(autoCorrectScroll==1){
160
+ if(mPS2id.clicked.length) mPS2id.clicked.trigger("click.mPS2id");
161
+ autoCorrectScroll=0;
162
+ }
163
  }
164
  },
165
  excludeSelectors:_o.instances[_p+"_instance_"+i]["excludeSelector"],
236
  return val.substr(0,1)===">" ? $(a).height()>val.substr(1) : val.substr(0,1)==="<" ? $(a).height()<val.substr(1) : $(a).height()===parseInt(val);
237
  }
238
  });
239
+ //extend jQuery with additional custom easings with custom names
240
+ //for more info see issue: https://wordpress.org/support/topic/easing-setting-does-not-take-effect/
241
+ //some themes and plugins include outdated versions (1.3.x) of jquery.easing script (https://github.com/gdsmith/jquery.easing) which does not work with jquery 3.5 which is included in WordPress 5.6.
242
+ $.easing.ps2id_easeInQuad=$.easing.ps2id_easeInQuad || function(x){
243
+ return x*x;
244
+ };
245
+ $.easing.ps2id_easeOutQuad=$.easing.ps2id_easeOutQuad || function(x){
246
+ return 1-(1-x)*(1-x);
247
+ };
248
+ $.easing.ps2id_easeInOutQuad=$.easing.ps2id_easeInOutQuad || function(x){
249
+ return x<0.5 ? 2*x*x : 1-Math.pow(-2*x+2,2)/2;
250
+ };
251
+ $.easing.ps2id_easeInCubic=$.easing.ps2id_easeInCubic || function(x){
252
+ return x*x*x;
253
+ };
254
+ $.easing.ps2id_easeOutCubic=$.easing.ps2id_easeOutCubic || function(x){
255
+ return 1-Math.pow(1-x,3);
256
+ };
257
+ $.easing.ps2id_easeInOutCubic=$.easing.ps2id_easeInOutCubic || function(x){
258
+ return x<0.5 ? 4*x*x*x : 1-Math.pow(-2*x+2,3)/2;
259
+ };
260
+ $.easing.ps2id_easeInQuart=$.easing.ps2id_easeInQuart || function(x){
261
+ return x*x*x*x;
262
+ };
263
+ $.easing.ps2id_easeOutQuart=$.easing.ps2id_easeOutQuart || function(x){
264
+ return 1-Math.pow(1-x,4);
265
+ };
266
+ $.easing.ps2id_easeInOutQuart=$.easing.ps2id_easeInOutQuart || function(x){
267
+ return x<0.5 ? 8*x*x*x*x : 1-Math.pow(-2*x+2,4)/2;
268
+ };
269
+ $.easing.ps2id_easeInQuint=$.easing.ps2id_easeInQuint || function(x){
270
+ return x*x*x*x*x;
271
+ };
272
+ $.easing.ps2id_easeOutQuint=$.easing.ps2id_easeOutQuint || function(x){
273
+ return 1-Math.pow(1-x,5);
274
+ };
275
+ $.easing.ps2id_easeInOutQuint=$.easing.ps2id_easeInOutQuint || function(x){
276
+ return x<0.5 ? 16*x*x*x*x*x : 1-Math.pow(-2*x+2,5)/2;
277
+ };
278
+ $.easing.ps2id_easeInExpo=$.easing.ps2id_easeInExpo || function(x){
279
+ return x===0 ? 0 : Math.pow(2,10*x-10);
280
+ };
281
+ $.easing.ps2id_easeOutExpo=$.easing.ps2id_easeOutExpo || function(x){
282
+ return x===1 ? 1 : 1-Math.pow(2,-10*x);
283
+ };
284
+ $.easing.ps2id_easeInOutExpo=$.easing.ps2id_easeInOutExpo || function(x){
285
+ return x===0 ? 0 : x===1 ? 1 : x<0.5 ? Math.pow(2,20*x-10)/2 : (2-Math.pow(2,-20*x+10))/2;
286
+ };
287
+ $.easing.ps2id_easeInSine=$.easing.ps2id_easeInSine || function(x){
288
+ return 1-Math.cos(x*Math.PI/2);
289
+ };
290
+ $.easing.ps2id_easeOutSine=$.easing.ps2id_easeOutSine || function(x){
291
+ return Math.sin(x*Math.PI/2);
292
+ };
293
+ $.easing.ps2id_easeInOutSine=$.easing.ps2id_easeInOutSine || function(x){
294
+ return -(Math.cos(Math.PI*x)-1)/2;
295
+ };
296
+ $.easing.ps2id_easeInCirc=$.easing.ps2id_easeInCirc || function(x){
297
+ return 1-Math.sqrt(1-Math.pow(x,2));
298
+ };
299
+ $.easing.ps2id_easeOutCirc=$.easing.ps2id_easeOutCirc || function(x){
300
+ return Math.sqrt(1-Math.pow(x-1,2));
301
+ };
302
+ $.easing.ps2id_easeInOutCirc=$.easing.ps2id_easeInOutCirc || function(x){
303
+ return x<0.5 ? (1-Math.sqrt(1-Math.pow(2*x,2)))/2 : (Math.sqrt(1-Math.pow(-2*x+2,2))+1)/2;
304
+ };
305
+ $.easing.ps2id_easeInElastic=$.easing.ps2id_easeInElastic || function(x){
306
+ return x===0 ? 0 : x===1 ? 1 : -Math.pow(2,10*x-10)*Math.sin((x*10-10.75)*((2*Math.PI)/3));
307
+ };
308
+ $.easing.ps2id_easeOutElastic=$.easing.ps2id_easeOutElastic || function(x){
309
+ return x===0 ? 0 : x===1 ? 1 : Math.pow(2,-10*x)*Math.sin((x*10-0.75)*((2*Math.PI)/3))+1;
310
+ };
311
+ $.easing.ps2id_easeInOutElastic=$.easing.ps2id_easeInOutElastic || function(x){
312
+ return x===0 ? 0 : x===1 ? 1 : x<0.5 ? -(Math.pow(2,20*x-10)*Math.sin((20*x-11.125)*((2*Math.PI)/4.5)))/2 : Math.pow(2,-20*x+10)*Math.sin((20*x-11.125)*((2*Math.PI)/4.5))/2+1;
313
+ };
314
+ $.easing.ps2id_easeInBack=$.easing.ps2id_easeInBack || function(x){
315
+ return (1.70158+1)*x*x*x-1.70158*x*x;
316
+ };
317
+ $.easing.ps2id_easeOutBack=$.easing.ps2id_easeOutBack || function(x){
318
+ return 1+(1.70158+1)*Math.pow(x-1,3)+1.70158*Math.pow(x-1,2);
319
+ };
320
+ $.easing.ps2id_easeInOutBack=$.easing.ps2id_easeInOutBack || function(x){
321
+ return x<0.5 ? (Math.pow(2*x,2)*(((1.70158*1.525)+1)*2*x-(1.70158*1.525)))/2 : (Math.pow(2*x-2,2)*(((1.70158*1.525)+1)*(x*2-2)+(1.70158*1.525))+2)/2;
322
+ };
323
+ $.easing.ps2id_easeInBounce=$.easing.ps2id_easeInBounce || function(x){
324
+ return 1-__ps2id_bounceOut(1-x);
325
+ };
326
+ $.easing.ps2id_easeOutBounce=$.easing.ps2id_easeOutBounce || __ps2id_bounceOut;
327
+ $.easing.ps2id_easeInOutBounce=$.easing.ps2id_easeInOutBounce || function(x){
328
+ return x<0.5 ? (1-__ps2id_bounceOut(1-2*x))/2 : (1+__ps2id_bounceOut(2*x-1))/2;
329
+ };
330
+ function __ps2id_bounceOut(x){
331
+ var n1=7.5625,d1=2.75;
332
+ if(x<1/d1){
333
+ return n1*x*x;
334
+ }else if(x<2/d1){
335
+ return n1*(x-=(1.5/d1))*x+.75;
336
+ }else if(x<2.5/d1){
337
+ return n1*(x-=(2.25/d1))*x+.9375;
338
+ }else{
339
+ return n1*(x-=(2.625/d1))*x+.984375;
340
+ }
341
+ }
342
  })(jQuery);
js/page-scroll-to-id.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /* Page scroll to id - version 1.6.9 */
2
- !function(y,O,c,e){var n,b,s,a,l,i,o,r,h,u,t,d,f="mPageScroll2id",I="mPS2id",g={scrollSpeed:1e3,autoScrollSpeed:!0,scrollEasing:"easeInOutQuint",scrollingEasing:"easeOutQuint",pageEndSmoothScroll:!0,layout:"vertical",offset:0,highlightSelector:!1,clickedClass:I+"-clicked",targetClass:I+"-target",highlightClass:I+"-highlight",forceSingleHighlight:!1,keepHighlightUntilNext:!1,highlightByNextTarget:!1,disablePluginBelow:!1,clickEvents:!0,appendHash:!1,onStart:function(){},onComplete:function(){},defaultSelector:!1,live:!0,liveSelector:!1,excludeSelectors:!1,encodeLinks:!1},p=0,_={init:function(e){e=y.extend(!0,{},g,e);if(y(c).data(I,e),b=y(c).data(I),!this.selector){var t="__"+I;this.each(function(){var e=y(this);e.hasClass(t)||e.addClass(t)}),this.selector="."+t}b.liveSelector&&(this.selector+=","+b.liveSelector),n=n?n+","+this.selector:this.selector,b.defaultSelector&&("object"==typeof y(n)&&0!==y(n).length||(n=".m_PageScroll2id,a[rel~='m_PageScroll2id'],.page-scroll-to-id,a[rel~='page-scroll-to-id'],._ps2id")),b.clickEvents&&y(c).undelegate("."+I).delegate(n,"click."+I,function(e){if(w._isDisabled.call(null))w._removeClasses.call(null);else{var t=y(this),n=t.attr("href"),s=t.prop("href").baseVal||t.prop("href");b.excludeSelectors&&t.is(b.excludeSelectors)||n&&-1!==n.indexOf("#/")||(w._reset.call(null),u=t.data("ps2id-offset")||0,w._isValid.call(null,n,s)&&w._findTarget.call(null,n)&&(e.preventDefault(),a="selector",l=t,w._setClasses.call(null,!0),w._scrollTo.call(null)))}}),y(O).unbind("."+I).bind("scroll."+I+" resize."+I,function(){if(w._isDisabled.call(null))w._removeClasses.call(null);else{var a=y("._"+I+"-t");a.each(function(e){var t=y(this),n=t.attr("id"),s=w._findHighlight.call(null,n);w._setClasses.call(null,!1,t,s),e==a.length-1&&w._extendClasses.call(null)})}}),s=!0,w._setup.call(null),w._live.call(null)},scrollTo:function(e,t){if(w._isDisabled.call(null))w._removeClasses.call(null);else if(e&&void 0!==e){w._isInit.call(null);var n={layout:b.layout,offset:b.offset,clicked:!1};t=y.extend(!0,{},n,t);w._reset.call(null),r=t.layout,h=t.offset,e=-1!==e.indexOf("#")?e:"#"+e,w._isValid.call(null,e)&&w._findTarget.call(null,e)&&(a="scrollTo",(l=t.clicked)&&w._setClasses.call(null,!0),w._scrollTo.call(null))}},destroy:function(){y(O).unbind("."+I),y(c).undelegate("."+I).removeData(I),y("._"+I+"-t").removeData(I),w._removeClasses.call(null,!0)}},w={_isDisabled:function(){var e=O,t="inner",n=b.disablePluginBelow instanceof Array?[b.disablePluginBelow[0]||0,b.disablePluginBelow[1]||0]:[b.disablePluginBelow||0,0];return"innerWidth"in O||(t="client",e=c.documentElement||c.body),e[t+"Width"]<=n[0]||e[t+"Height"]<=n[1]},_isValid:function(e,t){if(e){var n=-1!==(t=t||e).indexOf("#/")?t.split("#/")[0]:t.split("#")[0],s=(O.location!==O.parent.location?O.parent.location:O.location).toString().split("#")[0];return"#"!==e&&-1!==e.indexOf("#")&&(""===n||decodeURIComponent(n)===decodeURIComponent(s))}},_setup:function(){var l=w._highlightSelector(),o=1,r=0;return y(l).each(function(){var e=y(this),t=e.attr("href"),n=e.prop("href").baseVal||e.prop("href");if(w._isValid.call(null,t,n)){if(b.excludeSelectors&&e.is(b.excludeSelectors))return;var s=-1!==t.indexOf("#/")?t.split("#/")[1]:t.split("#")[1],a=-1!==s.indexOf("%")?y(c.getElementById(s)):y("#"+s);if(0<a.length){b.highlightByNextTarget&&a!==r&&(r?r.data(I,{tn:a}):a.data(I,{tn:"0"}),r=a),a.hasClass("_"+I+"-t")||a.addClass("_"+I+"-t"),a.data(I,{i:o}),e.hasClass("_"+I+"-h")||e.addClass("_"+I+"-h");var i=w._findHighlight.call(null,s);w._setClasses.call(null,!1,a,i),p=o,++o==y(l).length&&w._extendClasses.call(null)}}})},_highlightSelector:function(){return b.highlightSelector&&""!==b.highlightSelector?b.highlightSelector:n},_findTarget:function(e){var t=-1!==e.indexOf("#/")?e.split("#/")[1]:e.split("#")[1],n=-1!==t.indexOf("%")?y(c.getElementById(t)):y("#"+t);if(n.length<1||"fixed"===n.css("position")){if("top"!==t)return;n=y("body")}return i=n,r||(r=b.layout),h=w._setOffset.call(null),(o=[(n.offset().top-h[0]).toString(),(n.offset().left-h[1]).toString()])[0]=o[0]<0?0:o[0],o[1]=o[1]<0?0:o[1],o},_setOffset:function(){var e,t,n,s;switch(h||(h=b.offset?b.offset:0),u&&(h=u),typeof h){case"object":case"string":0<(t=[(e=[h.y?h.y:h,h.x?h.x:h])[0]instanceof jQuery?e[0]:y(e[0]),e[1]instanceof jQuery?e[1]:y(e[1])])[0].length?(n=t[0].height(),"fixed"===t[0].css("position")&&(n+=t[0][0].offsetTop)):n=!isNaN(parseFloat(e[0]))&&isFinite(e[0])?parseInt(e[0]):0,0<t[1].length?(s=t[1].width(),"fixed"===t[1].css("position")&&(s+=t[1][0].offsetLeft)):s=!isNaN(parseFloat(e[1]))&&isFinite(e[1])?parseInt(e[1]):0;break;case"function":(e=h.call(null))instanceof Array?(n=e[0],s=e[1]):n=s=e;break;default:n=s=parseInt(h)}return[n,s]},_findHighlight:function(e){var t=O.location!==O.parent.location?O.parent.location:O.location,n=t.toString().split("#")[0],s=t.pathname;if(-1!==n.indexOf("'")&&(n=n.replace("'","\\'")),-1!==s.indexOf("'")&&(s=s.replace("'","\\'")),n=decodeURIComponent(n),s=decodeURIComponent(s),b.encodeLinks){var a=encodeURI(n).toLowerCase(),i=encodeURI(s).toLowerCase();return y("._"+I+"-h[href='#"+e+"'],._"+I+"-h[href='"+n+"#"+e+"'],._"+I+"-h[href='"+s+"#"+e+"'],._"+I+"-h[href='#/"+e+"'],._"+I+"-h[href='"+n+"#/"+e+"'],._"+I+"-h[href='"+s+"#/"+e+"'],._"+I+"-h[href='"+a+"#/"+e+"'],._"+I+"-h[href='"+a+"#"+e+"'],._"+I+"-h[href='"+i+"#/"+e+"'],._"+I+"-h[href='"+i+"#"+e+"']")}return y("._"+I+"-h[href='#"+e+"'],._"+I+"-h[href='"+n+"#"+e+"'],._"+I+"-h[href='"+s+"#"+e+"'],._"+I+"-h[href='#/"+e+"'],._"+I+"-h[href='"+n+"#/"+e+"'],._"+I+"-h[href='"+s+"#/"+e+"']")},_setClasses:function(e,t,n){var s=b.clickedClass,a=b.targetClass,i=b.highlightClass;e&&s&&""!==s?(y("."+s).removeClass(s),l.addClass(s)):t&&a&&""!==a&&n&&i&&""!==i&&(w._currentTarget.call(null,t)?(t.addClass(a),n.addClass(i)):(!b.keepHighlightUntilNext||1<y("."+i).length)&&(t.removeClass(a),n.removeClass(i)))},_extendClasses:function(){var e=b.targetClass,t=b.highlightClass,n=y("."+e),s=y("."+t),a=e+"-first",i=e+"-last",l=t+"-first",o=t+"-last";y("._"+I+"-t").removeClass(a+" "+i),y("._"+I+"-h").removeClass(l+" "+o),b.forceSingleHighlight?b.keepHighlightUntilNext&&1<n.length?(n.slice(0,1).removeClass(e),s.slice(0,1).removeClass(t)):(n.slice(1).removeClass(e),s.slice(1).removeClass(t)):(n.slice(0,1).addClass(a).end().slice(-1).addClass(i),s.slice(0,1).addClass(l).end().slice(-1).addClass(o))},_removeClasses:function(e){y("."+b.clickedClass).removeClass(b.clickedClass),y("."+b.targetClass).removeClass(b.targetClass+" "+b.targetClass+"-first "+b.targetClass+"-last"),y("."+b.highlightClass).removeClass(b.highlightClass+" "+b.highlightClass+"-first "+b.highlightClass+"-last"),e&&(y("._"+I+"-t").removeClass("_"+I+"-t"),y("._"+I+"-h").removeClass("_"+I+"-h"))},_currentTarget:function(e){if(e.data(I)){var t=b["target_"+e.data(I).i],n=e.data("ps2id-target"),s=n&&y(n)[0]?y(n)[0].getBoundingClientRect():e[0].getBoundingClientRect();if(void 0!==t){var a=e.offset().top,i=e.offset().left,l=t.from?t.from+a:a,o=t.to?t.to+a:a,r=t.fromX?t.fromX+i:i,c=t.toX?t.toX+i:i;return s.top>=o&&s.top<=l&&s.left>=c&&s.left<=r}var h=y(O).height(),u=y(O).width(),d=n?y(n).height():e.height(),f=n?y(n).width():e.width(),g=1+d/h,p=g,_=d<h?g*(h/d):g,w=1+f/u,m=w,S=f<u?w*(u/f):w,v=[s.top<=h/p,s.bottom>=h/_,s.left<=u/m,s.right>=u/S];if(b.highlightByNextTarget){var C=e.data(I).tn;if(C){var x=C[0].getBoundingClientRect();"vertical"===b.layout?v=[s.top<=h/2,x.top>h/2,1,1]:"horizontal"===b.layout&&(v=[1,1,s.left<=u/2,x.left>u/2])}}return v[0]&&v[1]&&v[2]&&v[3]}},_scrollTo:function(){d=w._scrollSpeed.call(null),o=b.pageEndSmoothScroll?w._pageEndSmoothScroll.call(null):o;var e=y("html,body"),t=b.autoScrollSpeed?w._autoScrollSpeed.call(null):d,n=e.is(":animated")?b.scrollingEasing:b.scrollEasing,s=y(O).scrollTop(),a=y(O).scrollLeft();switch(r){case"horizontal":a!=o[1]&&(w._callbacks.call(null,"onStart"),e.stop().animate({scrollLeft:o[1]},t,n).promise().then(function(){w._callbacks.call(null,"onComplete")}));break;case"auto":var i;if(s!=o[0]||a!=o[1])if(w._callbacks.call(null,"onStart"),navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/))e.stop().animate({pageYOffset:o[0],pageXOffset:o[1]},{duration:t,easing:n,step:function(e,t){"pageXOffset"==t.prop?i=e:"pageYOffset"==t.prop&&O.scrollTo(i,e)}}).promise().then(function(){w._callbacks.call(null,"onComplete")});else e.stop().animate({scrollTop:o[0],scrollLeft:o[1]},t,n).promise().then(function(){w._callbacks.call(null,"onComplete")});break;default:s!=o[0]&&(w._callbacks.call(null,"onStart"),e.stop().animate({scrollTop:o[0]},t,n).promise().then(function(){w._callbacks.call(null,"onComplete")}))}},_pageEndSmoothScroll:function(){var e=y(c).height(),t=y(c).width(),n=y(O).height(),s=y(O).width();return[e-o[0]<n?e-n:o[0],t-o[1]<s?t-s:o[1]]},_scrollSpeed:function(){var s=b.scrollSpeed;return l&&l.length&&l.add(l.parent()).each(function(){var e=y(this);if(e.attr("class")){var t=e.attr("class").split(" ");for(var n in t)if(String(t[n]).match(/^ps2id-speed-\d+$/)){s=t[n].split("ps2id-speed-")[1];break}}}),parseInt(s)},_autoScrollSpeed:function(){var e=y(O).scrollTop(),t=y(O).scrollLeft(),n=y(c).height(),s=y(c).width(),a=[d+d*Math.floor(Math.abs(o[0]-e)/n*100)/100,d+d*Math.floor(Math.abs(o[1]-t)/s*100)/100];return Math.max.apply(Math,a)},_callbacks:function(e){if(b)switch(this[I]={trigger:a,clicked:l,target:i,scrollTo:{y:o[0],x:o[1]}},e){case"onStart":if(b.appendHash&&O.history&&O.history.pushState&&l&&l.length){var t="#"+l.attr("href").split("#")[1];t!==O.location.hash&&history.pushState("","",t)}b.onStart.call(null,this[I]);break;case"onComplete":b.onComplete.call(null,this[I])}},_reset:function(){r=h=u=!1},_isInit:function(){s||_.init.apply(this)},_live:function(){t=setTimeout(function(){b.live?y(w._highlightSelector()).length!==p&&w._setup.call(null):t&&clearTimeout(t),w._live.call(null)},1e3)},_easing:function(){function t(e){var t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375}y.easing.easeInQuad=y.easing.easeInQuad||function(e){return e*e},y.easing.easeOutQuad=y.easing.easeOutQuad||function(e){return 1-(1-e)*(1-e)},y.easing.easeInOutQuad=y.easing.easeInOutQuad||function(e){return e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2},y.easing.easeInCubic=y.easing.easeInCubic||function(e){return e*e*e},y.easing.easeOutCubic=y.easing.easeOutCubic||function(e){return 1-Math.pow(1-e,3)},y.easing.easeInOutCubic=y.easing.easeInOutCubic||function(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2},y.easing.easeInQuart=y.easing.easeInQuart||function(e){return e*e*e*e},y.easing.easeOutQuart=y.easing.easeOutQuart||function(e){return 1-Math.pow(1-e,4)},y.easing.easeInOutQuart=y.easing.easeInOutQuart||function(e){return e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2},y.easing.easeInQuint=y.easing.easeInQuint||function(e){return e*e*e*e*e},y.easing.easeOutQuint=y.easing.easeOutQuint||function(e){return 1-Math.pow(1-e,5)},y.easing.easeInOutQuint=y.easing.easeInOutQuint||function(e){return e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2},y.easing.easeInExpo=y.easing.easeInExpo||function(e){return 0===e?0:Math.pow(2,10*e-10)},y.easing.easeOutExpo=y.easing.easeOutExpo||function(e){return 1===e?1:1-Math.pow(2,-10*e)},y.easing.easeInOutExpo=y.easing.easeInOutExpo||function(e){return 0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2},y.easing.easeInSine=y.easing.easeInSine||function(e){return 1-Math.cos(e*Math.PI/2)},y.easing.easeOutSine=y.easing.easeOutSine||function(e){return Math.sin(e*Math.PI/2)},y.easing.easeInOutSine=y.easing.easeInOutSine||function(e){return-(Math.cos(Math.PI*e)-1)/2},y.easing.easeInCirc=y.easing.easeInCirc||function(e){return 1-Math.sqrt(1-Math.pow(e,2))},y.easing.easeOutCirc=y.easing.easeOutCirc||function(e){return Math.sqrt(1-Math.pow(e-1,2))},y.easing.easeInOutCirc=y.easing.easeInOutCirc||function(e){return e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2},y.easing.easeInElastic=y.easing.easeInElastic||function(e){return 0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*(2*Math.PI/3))},y.easing.easeOutElastic=y.easing.easeOutElastic||function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*(2*Math.PI/3))+1},y.easing.easeInOutElastic=y.easing.easeInOutElastic||function(e){return 0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*(2*Math.PI/4.5))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*(2*Math.PI/4.5))/2+1},y.easing.easeInBack=y.easing.easeInBack||function(e){return 2.70158*e*e*e-1.70158*e*e},y.easing.easeOutBack=y.easing.easeOutBack||function(e){return 1+2.70158*Math.pow(e-1,3)+1.70158*Math.pow(e-1,2)},y.easing.easeInOutBack=y.easing.easeInOutBack||function(e){return e<.5?Math.pow(2*e,2)*(7.189819*e-2.5949095)/2:(Math.pow(2*e-2,2)*(3.5949095*(2*e-2)+2.5949095)+2)/2},y.easing.easeInBounce=y.easing.easeInBounce||function(e){return 1-t(1-e)},y.easing.easeOutBounce=y.easing.easeOutBounce||t,y.easing.easeInOutBounce=y.easing.easeInOutBounce||function(e){return e<.5?(1-t(1-2*e))/2:(1+t(2*e-1))/2}}};w._easing.call(),y.fn[f]=function(e){return _[e]?_[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void y.error("Method "+e+" does not exist"):_.init.apply(this,arguments)},y[f]=function(e){return _[e]?_[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void y.error("Method "+e+" does not exist"):_.init.apply(this,arguments)},y[f].defaults=g}(jQuery,window,document),function(l){var o="mPS2id",r=mPS2id_params,c=r.shortcode_class,h=location.hash||null,u=function(e,t){try{l(e)}catch(e){return!1}return l(e).length&&(t||l("a[href*='"+e+"']").filter(function(){return 1==l(this).data(o+"Element")}).length)},d=function(e){if(-1===e.indexOf(","))return e;var t=e.split(",");return{y:t[0]||"0",x:t[1]||"0"}},f=function(e){if(-1===e.indexOf(","))return e;var t=e.split(",");return[t[0]||"0",t[1]||"0"]},g=function(e){"horizontal"!==e&&l(window).scrollTop(0),"vertical"!==e&&l(window).scrollLeft(0)},p=function(e,t){for(var n=e.click.length-1;0<=n;n--){var s=e.click[n];s&&"mPS2id"!=s.namespace&&("a[href*=#]"===s.selector?s.selector="a[href*=#]:not(._mPS2id-h)":'a[href*="#"]'===s.selector?s.selector='a[href*="#"]:not(._mPS2id-h)':"a[href*=#]:not([href=#])"===s.selector?s.selector="a[href*=#]:not([href=#]):not(._mPS2id-h)":'a[href*="#"]:not([href="#"])'===s.selector?s.selector='a[href*="#"]:not([href="#"]):not(._mPS2id-h)':s.selector&&-1!==s.selector.indexOf("mobmenu")?t.off("click"):t.off("click",s.handler))}},_="a[data-ps2id-api='true'][href*='#'],.ps2id > a[href*='#'],a.ps2id[href*='#']";l(function(){for(var e=0;e<r.total_instances;e++){var t=l("[class*='ps2id-id-']");if(t.length&&t.each(function(){var e,t=l(this),n=t.attr("class").split(" ");if(!t.attr("id"))for(var s in n)if(String(n[s]).match(/^ps2id-id-\S+$/)){e=n[s].split("ps2id-id-")[1],l("#"+e).length||t.attr("id",e);break}}),"true"===r.instances[o+"_instance_"+e].scrollToHash&&h&&(l(r.instances[o+"_instance_"+e].selector+",."+c+","+_).not(r.instances[o+"_instance_"+e].excludeSelector).each(function(){l(this).data(o+"Element",!0)}),u(h,"true"===r.instances[o+"_instance_"+e].scrollToHashForAll))){var n="true"===r.instances[o+"_instance_"+e].scrollToHashRemoveUrlHash?window.location.href.replace(/#.*$/,""):window.location.href.replace(/#.*$/,"#");g(r.instances[o+"_instance_"+e].layout),window.history&&window.history.replaceState?window.history.replaceState("","",n):window.location.href=n}}l("html").css("scroll-behavior","auto"),window.twentytwenty&&window.twentytwenty.smoothScroll&&(window.twentytwenty.smoothScroll=null)}),l(window).on("load",function(){for(var e=0;e<r.total_instances;e++){0<=r.instances[o+"_instance_"+e].selector.indexOf("a[href*=#]:not([href=#])")&&console.log("ps2id selector issue: a[href*=#]:not([href=#]) selector needs quotes"),0<=r.instances[o+"_instance_"+e].excludeSelector.indexOf("a[href*=#]:not([href=#])")&&console.log("ps2id excluded selector issue: a[href*=#]:not([href=#]) selector needs quotes");var n=l(r.instances[o+"_instance_"+e].selector+",."+c+","+_),t=r.instances[o+"_instance_"+e].autoCorrectScroll,s=0;if(window.ps2id_special_params&&(window.ps2id_special_params.highlightSelector&&(r.instances[o+"_instance_"+e].highlightSelector=window.ps2id_special_params.highlightSelector),window.ps2id_special_params.scrollSpeed&&(r.instances[o+"_instance_"+e].scrollSpeed=window.ps2id_special_params.scrollSpeed),window.ps2id_special_params.scrollEasing&&(r.instances[o+"_instance_"+e].scrollEasing=window.ps2id_special_params.scrollEasing),void 0!==window.ps2id_special_params.forceSingleHighlight&&(r.instances[o+"_instance_"+e].forceSingleHighlight=window.ps2id_special_params.forceSingleHighlight),void 0!==window.ps2id_special_params.keepHighlightUntilNext&&(r.instances[o+"_instance_"+e].keepHighlightUntilNext=window.ps2id_special_params.keepHighlightUntilNext),void 0!==window.ps2id_special_params.appendHash&&(r.instances[o+"_instance_"+e].appendHash=window.ps2id_special_params.appendHash),window.ps2id_special_params.layout&&(r.instances[o+"_instance_"+e].layout=window.ps2id_special_params.layout),window.ps2id_special_params.offset&&(r.instances[o+"_instance_"+e].offset=window.ps2id_special_params.offset)),n.mPageScroll2id({scrollSpeed:r.instances[o+"_instance_"+e].scrollSpeed,autoScrollSpeed:"true"===r.instances[o+"_instance_"+e].autoScrollSpeed,scrollEasing:r.instances[o+"_instance_"+e].scrollEasing,scrollingEasing:r.instances[o+"_instance_"+e].scrollingEasing,pageEndSmoothScroll:"true"===r.instances[o+"_instance_"+e].pageEndSmoothScroll,layout:r.instances[o+"_instance_"+e].layout,offset:d(r.instances[o+"_instance_"+e].offset.toString()),highlightSelector:r.instances[o+"_instance_"+e].highlightSelector,clickedClass:r.instances[o+"_instance_"+e].clickedClass,targetClass:r.instances[o+"_instance_"+e].targetClass,highlightClass:r.instances[o+"_instance_"+e].highlightClass,forceSingleHighlight:"true"===r.instances[o+"_instance_"+e].forceSingleHighlight,keepHighlightUntilNext:"true"===r.instances[o+"_instance_"+e].keepHighlightUntilNext,highlightByNextTarget:"true"===r.instances[o+"_instance_"+e].highlightByNextTarget,disablePluginBelow:f(r.instances[o+"_instance_"+e].disablePluginBelow.toString()),appendHash:"true"===r.instances[o+"_instance_"+e].appendHash,onStart:function(){"true"===t&&"selector"===mPS2id.trigger&&s++},onComplete:function(){1==s&&(mPS2id.clicked.length&&mPS2id.clicked.trigger("click.mPS2id"),s=0)},excludeSelectors:r.instances[o+"_instance_"+e].excludeSelector,encodeLinks:"true"===r.instances[o+"_instance_"+e].encodeLinks,liveSelector:r.instances[o+"_instance_"+e].selector+",."+c+","+_}),"true"===r.instances[o+"_instance_"+e].scrollToHash&&h&&u(h,"true"===r.instances[o+"_instance_"+e].scrollToHashForAll)){g(r.instances[o+"_instance_"+e].layout);var a=r.instances[o+"_instance_"+e].scrollToHashUseElementData,i=l("a._mPS2id-h[href$='"+h+"'][data-ps2id-offset]:not([data-ps2id-offset=''])").last();setTimeout(function(){"true"===a&&i.length?i.trigger("click.mPS2id"):l.mPageScroll2id("scrollTo",h),-1!==window.location.href.indexOf("#")&&(window.history&&window.history.replaceState?window.history.replaceState("","",h):window.location.hash=h)},r.instances[o+"_instance_"+e].scrollToHashDelay)}"true"===r.instances[o+"_instance_"+e].unbindUnrelatedClickEvents&&setTimeout(function(){var e=n.length?l._data(n[0],"events"):null,t=n.length?l._data(l(document)[0],"events"):null;e&&p(e,n),t&&p(t,n)},300),"true"===r.instances[o+"_instance_"+e].normalizeAnchorPointTargets&&l("a._mPS2id-t[id]:empty").css({display:"inline-block","line-height":0,width:0,height:0,border:"none"}),"true"===r.instances[o+"_instance_"+e].stopScrollOnUserAction&&l(document).on("mousewheel DOMMouseScroll touchmove",function(){var e=l("html,body");e.is(":animated")&&e.stop()})}}),l.extend(l.expr[":"],{absolute:l.expr[":"].absolute||function(e){return"absolute"===l(e).css("position")},relative:l.expr[":"].relative||function(e){return"relative"===l(e).css("position")},static:l.expr[":"].static||function(e){return"static"===l(e).css("position")},fixed:l.expr[":"].fixed||function(e){return"fixed"===l(e).css("position")},width:l.expr[":"].width||function(e,t,n){var s=n[3].replace("&lt;","<").replace("&gt;",">");return!!s&&(">"===s.substr(0,1)?l(e).width()>s.substr(1):"<"===s.substr(0,1)?l(e).width()<s.substr(1):l(e).width()===parseInt(s))},height:l.expr[":"].height||function(e,t,n){var s=n[3].replace("&lt;","<").replace("&gt;",">");return!!s&&(">"===s.substr(0,1)?l(e).height()>s.substr(1):"<"===s.substr(0,1)?l(e).height()<s.substr(1):l(e).height()===parseInt(s))}})}(jQuery);
1
+ /* Page scroll to id - version 1.7.2 */
2
+ !function(v,M,c,e){var n,x,s,a,l,i,o,r,u,h,t,d,p="mPageScroll2id",b="mPS2id",g={scrollSpeed:1e3,autoScrollSpeed:!0,scrollEasing:"easeInOutQuint",scrollingEasing:"easeOutQuint",pageEndSmoothScroll:!0,layout:"vertical",offset:0,highlightSelector:!1,clickedClass:b+"-clicked",targetClass:b+"-target",highlightClass:b+"-highlight",forceSingleHighlight:!1,keepHighlightUntilNext:!1,highlightByNextTarget:!1,disablePluginBelow:!1,clickEvents:!0,appendHash:!1,onStart:function(){},onComplete:function(){},defaultSelector:!1,live:!0,liveSelector:!1,excludeSelectors:!1,encodeLinks:!1},f=0,_={init:function(e){e=v.extend(!0,{},g,e);if(v(c).data(b,e),x=v(c).data(b),!this.selector){var t="__"+b;this.each(function(){var e=v(this);e.hasClass(t)||e.addClass(t)}),this.selector="."+t}x.liveSelector&&(this.selector+=","+x.liveSelector),n=n?n+","+this.selector:this.selector,x.defaultSelector&&("object"==typeof v(n)&&0!==v(n).length||(n=".m_PageScroll2id,a[rel~='m_PageScroll2id'],.page-scroll-to-id,a[rel~='page-scroll-to-id'],._ps2id")),x.clickEvents&&v(c).undelegate("."+b).delegate(n,"click."+b,function(e){if(w._isDisabled.call(null))w._removeClasses.call(null);else{var t=v(this),n=t.attr("href"),s=t.prop("href").baseVal||t.prop("href");x.excludeSelectors&&t.is(x.excludeSelectors)||n&&-1!==n.indexOf("#/")||(w._reset.call(null),h=t.data("ps2id-offset")||0,w._isValid.call(null,n,s)&&w._findTarget.call(null,n)&&(e.preventDefault(),a="selector",l=t,w._setClasses.call(null,!0),w._scrollTo.call(null)))}}),v(M).unbind("."+b).bind("scroll."+b+" resize."+b,function(){if(w._isDisabled.call(null))w._removeClasses.call(null);else{var a=v("._"+b+"-t");a.each(function(e){var t=v(this),n=t.attr("id"),s=w._findHighlight.call(null,n);w._setClasses.call(null,!1,t,s),e==a.length-1&&w._extendClasses.call(null)})}}),s=!0,w._setup.call(null),w._live.call(null)},scrollTo:function(e,t){if(w._isDisabled.call(null))w._removeClasses.call(null);else if(e&&void 0!==e){w._isInit.call(null);var n={layout:x.layout,offset:x.offset,clicked:!1};t=v.extend(!0,{},n,t);w._reset.call(null),r=t.layout,u=t.offset,e=-1!==e.indexOf("#")?e:"#"+e,w._isValid.call(null,e)&&w._findTarget.call(null,e)&&(a="scrollTo",(l=t.clicked)&&w._setClasses.call(null,!0),w._scrollTo.call(null))}},destroy:function(){v(M).unbind("."+b),v(c).undelegate("."+b).removeData(b),v("._"+b+"-t").removeData(b),w._removeClasses.call(null,!0)}},w={_isDisabled:function(){var e=M,t="inner",n=x.disablePluginBelow instanceof Array?[x.disablePluginBelow[0]||0,x.disablePluginBelow[1]||0]:[x.disablePluginBelow||0,0];return"innerWidth"in M||(t="client",e=c.documentElement||c.body),e[t+"Width"]<=n[0]||e[t+"Height"]<=n[1]},_isValid:function(e,t){if(e){var n=-1!==(t=t||e).indexOf("#/")?t.split("#/")[0]:t.split("#")[0],s=(M.location!==M.parent.location?M.parent.location:M.location).toString().split("#")[0];return"#"!==e&&-1!==e.indexOf("#")&&(""===n||decodeURIComponent(n)===decodeURIComponent(s))}},_setup:function(){var l=w._highlightSelector(),o=1,r=0;return v(l).each(function(){var e=v(this),t=e.attr("href"),n=e.prop("href").baseVal||e.prop("href");if(w._isValid.call(null,t,n)){if(x.excludeSelectors&&e.is(x.excludeSelectors))return;var s=-1!==t.indexOf("#/")?t.split("#/")[1]:t.split("#")[1],a=-1!==s.indexOf("%")?v(c.getElementById(s)):v("#"+s);if(0<a.length){x.highlightByNextTarget&&a!==r&&(r?r.data(b,{tn:a}):a.data(b,{tn:"0"}),r=a),a.hasClass("_"+b+"-t")||a.addClass("_"+b+"-t"),a.data(b,{i:o}),e.hasClass("_"+b+"-h")||e.addClass("_"+b+"-h");var i=w._findHighlight.call(null,s);w._setClasses.call(null,!1,a,i),f=o,++o==v(l).length&&w._extendClasses.call(null)}}})},_highlightSelector:function(){return x.highlightSelector&&""!==x.highlightSelector?x.highlightSelector:n},_findTarget:function(e){var t=-1!==e.indexOf("#/")?e.split("#/")[1]:e.split("#")[1],n=-1!==t.indexOf("%")?v(c.getElementById(t)):v("#"+t);if(n.length<1||"fixed"===n.css("position")){if("top"!==t)return;n=v("body")}return i=n,r||(r=x.layout),u=w._setOffset.call(null),(o=[(n.offset().top-u[0]).toString(),(n.offset().left-u[1]).toString()])[0]=o[0]<0?0:o[0],o[1]=o[1]<0?0:o[1],o},_setOffset:function(){var e,t,n,s;switch(u||(u=x.offset?x.offset:0),h&&(u=h),typeof u){case"object":case"string":0<(t=[(e=[u.y?u.y:u,u.x?u.x:u])[0]instanceof jQuery?e[0]:v(e[0]),e[1]instanceof jQuery?e[1]:v(e[1])])[0].length?(n=t[0].height(),"fixed"===t[0].css("position")&&(n+=t[0][0].offsetTop)):n=!isNaN(parseFloat(e[0]))&&isFinite(e[0])?parseInt(e[0]):0,0<t[1].length?(s=t[1].width(),"fixed"===t[1].css("position")&&(s+=t[1][0].offsetLeft)):s=!isNaN(parseFloat(e[1]))&&isFinite(e[1])?parseInt(e[1]):0;break;case"function":(e=u.call(null))instanceof Array?(n=e[0],s=e[1]):n=s=e;break;default:n=s=parseInt(u)}return[n,s]},_findHighlight:function(e){var t=M.location!==M.parent.location?M.parent.location:M.location,n=t.toString().split("#")[0],s=t.pathname;if(-1!==n.indexOf("'")&&(n=n.replace("'","\\'")),-1!==s.indexOf("'")&&(s=s.replace("'","\\'")),n=decodeURIComponent(n),s=decodeURIComponent(s),x.encodeLinks){var a=encodeURI(n).toLowerCase(),i=encodeURI(s).toLowerCase();return v("._"+b+"-h[href='#"+e+"'],._"+b+"-h[href='"+n+"#"+e+"'],._"+b+"-h[href='"+s+"#"+e+"'],._"+b+"-h[href='#/"+e+"'],._"+b+"-h[href='"+n+"#/"+e+"'],._"+b+"-h[href='"+s+"#/"+e+"'],._"+b+"-h[href='"+a+"#/"+e+"'],._"+b+"-h[href='"+a+"#"+e+"'],._"+b+"-h[href='"+i+"#/"+e+"'],._"+b+"-h[href='"+i+"#"+e+"']")}return v("._"+b+"-h[href='#"+e+"'],._"+b+"-h[href='"+n+"#"+e+"'],._"+b+"-h[href='"+s+"#"+e+"'],._"+b+"-h[href='#/"+e+"'],._"+b+"-h[href='"+n+"#/"+e+"'],._"+b+"-h[href='"+s+"#/"+e+"']")},_setClasses:function(e,t,n){var s=x.clickedClass,a=x.targetClass,i=x.highlightClass;e&&s&&""!==s?(v("."+s).removeClass(s),l.addClass(s)):t&&a&&""!==a&&n&&i&&""!==i&&(w._currentTarget.call(null,t)?(t.addClass(a),n.addClass(i)):(!x.keepHighlightUntilNext||1<v("."+i).length)&&(t.removeClass(a),n.removeClass(i)))},_extendClasses:function(){var e=x.targetClass,t=x.highlightClass,n=v("."+e),s=v("."+t),a=e+"-first",i=e+"-last",l=t+"-first",o=t+"-last";v("._"+b+"-t").removeClass(a+" "+i),v("._"+b+"-h").removeClass(l+" "+o),x.forceSingleHighlight?x.keepHighlightUntilNext&&1<n.length?(n.slice(0,1).removeClass(e),s.slice(0,1).removeClass(t)):(n.slice(1).removeClass(e),s.slice(1).removeClass(t)):(n.slice(0,1).addClass(a).end().slice(-1).addClass(i),s.slice(0,1).addClass(l).end().slice(-1).addClass(o))},_removeClasses:function(e){v("."+x.clickedClass).removeClass(x.clickedClass),v("."+x.targetClass).removeClass(x.targetClass+" "+x.targetClass+"-first "+x.targetClass+"-last"),v("."+x.highlightClass).removeClass(x.highlightClass+" "+x.highlightClass+"-first "+x.highlightClass+"-last"),e&&(v("._"+b+"-t").removeClass("_"+b+"-t"),v("._"+b+"-h").removeClass("_"+b+"-h"))},_currentTarget:function(e){if(e.data(b)){var t=x["target_"+e.data(b).i],n=e.data("ps2id-target"),s=n&&v(n)[0]?v(n)[0].getBoundingClientRect():e[0].getBoundingClientRect();if(void 0!==t){var a=e.offset().top,i=e.offset().left,l=t.from?t.from+a:a,o=t.to?t.to+a:a,r=t.fromX?t.fromX+i:i,c=t.toX?t.toX+i:i;return s.top>=o&&s.top<=l&&s.left>=c&&s.left<=r}var u=v(M).height(),h=v(M).width(),d=n?v(n).height():e.height(),p=n?v(n).width():e.width(),g=1+d/u,f=g,_=d<u?g*(u/d):g,w=1+p/h,S=w,m=p<h?w*(h/p):w,I=[s.top<=u/f,s.bottom>=u/_,s.left<=h/S,s.right>=h/m];if(x.highlightByNextTarget){var C=e.data(b).tn;if(C){var O=C[0].getBoundingClientRect();"vertical"===x.layout?I=[s.top<=u/2,O.top>u/2,1,1]:"horizontal"===x.layout&&(I=[1,1,s.left<=h/2,O.left>h/2])}}return I[0]&&I[1]&&I[2]&&I[3]}},_scrollTo:function(){d=w._scrollSpeed.call(null),o=x.pageEndSmoothScroll?w._pageEndSmoothScroll.call(null):o;var e=v("html,body"),t=x.autoScrollSpeed?w._autoScrollSpeed.call(null):d,n=e.is(":animated")?x.scrollingEasing:x.scrollEasing,s=v(M).scrollTop(),a=v(M).scrollLeft();switch(r){case"horizontal":a!=o[1]&&(w._callbacks.call(null,"onStart"),e.stop().animate({scrollLeft:o[1]},t,n).promise().then(function(){w._callbacks.call(null,"onComplete")}));break;case"auto":var i;if(s!=o[0]||a!=o[1])if(w._callbacks.call(null,"onStart"),navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/))e.stop().animate({pageYOffset:o[0],pageXOffset:o[1]},{duration:t,easing:n,step:function(e,t){"pageXOffset"==t.prop?i=e:"pageYOffset"==t.prop&&M.scrollTo(i,e)}}).promise().then(function(){w._callbacks.call(null,"onComplete")});else e.stop().animate({scrollTop:o[0],scrollLeft:o[1]},t,n).promise().then(function(){w._callbacks.call(null,"onComplete")});break;default:s!=o[0]&&(w._callbacks.call(null,"onStart"),e.stop().animate({scrollTop:o[0]},t,n).promise().then(function(){w._callbacks.call(null,"onComplete")}))}},_pageEndSmoothScroll:function(){var e=v(c).height(),t=v(c).width(),n=v(M).height(),s=v(M).width();return[e-o[0]<n?e-n:o[0],t-o[1]<s?t-s:o[1]]},_scrollSpeed:function(){var s=x.scrollSpeed;return l&&l.length&&l.add(l.parent()).each(function(){var e=v(this);if(e.attr("class")){var t=e.attr("class").split(" ");for(var n in t)if(String(t[n]).match(/^ps2id-speed-\d+$/)){s=t[n].split("ps2id-speed-")[1];break}}}),parseInt(s)},_autoScrollSpeed:function(){var e=v(M).scrollTop(),t=v(M).scrollLeft(),n=v(c).height(),s=v(c).width(),a=[d+d*Math.floor(Math.abs(o[0]-e)/n*100)/100,d+d*Math.floor(Math.abs(o[1]-t)/s*100)/100];return Math.max.apply(Math,a)},_callbacks:function(e){if(x)switch(this[b]={trigger:a,clicked:l,target:i,scrollTo:{y:o[0],x:o[1]}},e){case"onStart":if(x.appendHash&&M.history&&M.history.pushState&&l&&l.length){var t="#"+l.attr("href").split("#")[1];t!==M.location.hash&&history.pushState("","",t)}x.onStart.call(null,this[b]);break;case"onComplete":x.onComplete.call(null,this[b])}},_reset:function(){r=u=h=!1},_isInit:function(){s||_.init.apply(this)},_live:function(){t=setTimeout(function(){x.live?v(w._highlightSelector()).length!==f&&w._setup.call(null):t&&clearTimeout(t),w._live.call(null)},1e3)},_easing:function(){function t(e){var t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375}v.easing.easeInQuad=v.easing.easeInQuad||function(e){return e*e},v.easing.easeOutQuad=v.easing.easeOutQuad||function(e){return 1-(1-e)*(1-e)},v.easing.easeInOutQuad=v.easing.easeInOutQuad||function(e){return e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2},v.easing.easeInCubic=v.easing.easeInCubic||function(e){return e*e*e},v.easing.easeOutCubic=v.easing.easeOutCubic||function(e){return 1-Math.pow(1-e,3)},v.easing.easeInOutCubic=v.easing.easeInOutCubic||function(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2},v.easing.easeInQuart=v.easing.easeInQuart||function(e){return e*e*e*e},v.easing.easeOutQuart=v.easing.easeOutQuart||function(e){return 1-Math.pow(1-e,4)},v.easing.easeInOutQuart=v.easing.easeInOutQuart||function(e){return e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2},v.easing.easeInQuint=v.easing.easeInQuint||function(e){return e*e*e*e*e},v.easing.easeOutQuint=v.easing.easeOutQuint||function(e){return 1-Math.pow(1-e,5)},v.easing.easeInOutQuint=v.easing.easeInOutQuint||function(e){return e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2},v.easing.easeInExpo=v.easing.easeInExpo||function(e){return 0===e?0:Math.pow(2,10*e-10)},v.easing.easeOutExpo=v.easing.easeOutExpo||function(e){return 1===e?1:1-Math.pow(2,-10*e)},v.easing.easeInOutExpo=v.easing.easeInOutExpo||function(e){return 0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2},v.easing.easeInSine=v.easing.easeInSine||function(e){return 1-Math.cos(e*Math.PI/2)},v.easing.easeOutSine=v.easing.easeOutSine||function(e){return Math.sin(e*Math.PI/2)},v.easing.easeInOutSine=v.easing.easeInOutSine||function(e){return-(Math.cos(Math.PI*e)-1)/2},v.easing.easeInCirc=v.easing.easeInCirc||function(e){return 1-Math.sqrt(1-Math.pow(e,2))},v.easing.easeOutCirc=v.easing.easeOutCirc||function(e){return Math.sqrt(1-Math.pow(e-1,2))},v.easing.easeInOutCirc=v.easing.easeInOutCirc||function(e){return e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2},v.easing.easeInElastic=v.easing.easeInElastic||function(e){return 0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*(2*Math.PI/3))},v.easing.easeOutElastic=v.easing.easeOutElastic||function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*(2*Math.PI/3))+1},v.easing.easeInOutElastic=v.easing.easeInOutElastic||function(e){return 0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*(2*Math.PI/4.5))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*(2*Math.PI/4.5))/2+1},v.easing.easeInBack=v.easing.easeInBack||function(e){return 2.70158*e*e*e-1.70158*e*e},v.easing.easeOutBack=v.easing.easeOutBack||function(e){return 1+2.70158*Math.pow(e-1,3)+1.70158*Math.pow(e-1,2)},v.easing.easeInOutBack=v.easing.easeInOutBack||function(e){return e<.5?Math.pow(2*e,2)*(7.189819*e-2.5949095)/2:(Math.pow(2*e-2,2)*(3.5949095*(2*e-2)+2.5949095)+2)/2},v.easing.easeInBounce=v.easing.easeInBounce||function(e){return 1-t(1-e)},v.easing.easeOutBounce=v.easing.easeOutBounce||t,v.easing.easeInOutBounce=v.easing.easeInOutBounce||function(e){return e<.5?(1-t(1-2*e))/2:(1+t(2*e-1))/2}}};w._easing.call(),v.fn[p]=function(e){return _[e]?_[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void v.error("Method "+e+" does not exist"):_.init.apply(this,arguments)},v[p]=function(e){return _[e]?_[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void v.error("Method "+e+" does not exist"):_.init.apply(this,arguments)},v[p].defaults=g}(jQuery,window,document),function(o){var r,c="mPS2id",u=mPS2id_params,h=u.shortcode_class,d=location.hash||null,p=function(e,t){try{o(e)}catch(e){return!1}return o(e).length&&(t||o("a[href*='"+e+"']").filter(function(){return 1==o(this).data(c+"Element")}).length)},g=function(e){if(-1===e.indexOf(","))return e;var t=e.split(",");return{y:t[0]||"0",x:t[1]||"0"}},f=function(e){if(-1===e.indexOf(","))return e;var t=e.split(",");return[t[0]||"0",t[1]||"0"]},_=function(e){"horizontal"!==e&&o(window).scrollTop(0),"vertical"!==e&&o(window).scrollLeft(0)},w=function(e,t){for(var n=e.click.length-1;0<=n;n--){var s=e.click[n];s&&"mPS2id"!=s.namespace&&("a[href*=#]"===s.selector?s.selector="a[href*=#]:not(._mPS2id-h)":'a[href*="#"]'===s.selector?s.selector='a[href*="#"]:not(._mPS2id-h)':"a[href*=#]:not([href=#])"===s.selector?s.selector="a[href*=#]:not([href=#]):not(._mPS2id-h)":'a[href*="#"]:not([href="#"])'===s.selector?s.selector='a[href*="#"]:not([href="#"]):not(._mPS2id-h)':s.selector&&-1!==s.selector.indexOf("mobmenu")?t.off("click"):t.off("click",s.handler))}},S="a[data-ps2id-api='true'][href*='#'],.ps2id > a[href*='#'],a.ps2id[href*='#']";function t(e){var t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375}o(function(){for(var e=0;e<u.total_instances;e++){var t=o("[class*='ps2id-id-']");if(t.length&&t.each(function(){var e,t=o(this),n=t.attr("class").split(" ");if(!t.attr("id"))for(var s in n)if(String(n[s]).match(/^ps2id-id-\S+$/)){e=n[s].split("ps2id-id-")[1],o("#"+e).length||t.attr("id",e);break}}),"true"===u.instances[c+"_instance_"+e].scrollToHash&&d&&(o(u.instances[c+"_instance_"+e].selector+",."+h+","+S).not(u.instances[c+"_instance_"+e].excludeSelector).each(function(){o(this).data(c+"Element",!0)}),p(d,"true"===u.instances[c+"_instance_"+e].scrollToHashForAll))){var n="true"===u.instances[c+"_instance_"+e].scrollToHashRemoveUrlHash?window.location.href.replace(/#.*$/,""):window.location.href.replace(/#.*$/,"#");_(u.instances[c+"_instance_"+e].layout),window.history&&window.history.replaceState?window.history.replaceState("","",n):window.location.href=n}}o("html").css("scroll-behavior","auto"),window.twentytwenty&&window.twentytwenty.smoothScroll&&(window.twentytwenty.smoothScroll=null)}),o(window).on("load",function(){for(var e=0;e<u.total_instances;e++){0<=u.instances[c+"_instance_"+e].selector.indexOf("a[href*=#]:not([href=#])")&&console.log("ps2id selector issue: a[href*=#]:not([href=#]) selector needs quotes"),0<=u.instances[c+"_instance_"+e].excludeSelector.indexOf("a[href*=#]:not([href=#])")&&console.log("ps2id excluded selector issue: a[href*=#]:not([href=#]) selector needs quotes");var n=o(u.instances[c+"_instance_"+e].selector+",."+h+","+S),t=u.instances[c+"_instance_"+e].autoCorrectScroll,s=0,a=u.instances[c+"_instance_"+e].autoCorrectScrollExtend;if(window.ps2id_special_params&&(window.ps2id_special_params.highlightSelector&&(u.instances[c+"_instance_"+e].highlightSelector=window.ps2id_special_params.highlightSelector),window.ps2id_special_params.scrollSpeed&&(u.instances[c+"_instance_"+e].scrollSpeed=window.ps2id_special_params.scrollSpeed),window.ps2id_special_params.scrollEasing&&(u.instances[c+"_instance_"+e].scrollEasing=window.ps2id_special_params.scrollEasing),void 0!==window.ps2id_special_params.forceSingleHighlight&&(u.instances[c+"_instance_"+e].forceSingleHighlight=window.ps2id_special_params.forceSingleHighlight),void 0!==window.ps2id_special_params.keepHighlightUntilNext&&(u.instances[c+"_instance_"+e].keepHighlightUntilNext=window.ps2id_special_params.keepHighlightUntilNext),void 0!==window.ps2id_special_params.appendHash&&(u.instances[c+"_instance_"+e].appendHash=window.ps2id_special_params.appendHash),window.ps2id_special_params.layout&&(u.instances[c+"_instance_"+e].layout=window.ps2id_special_params.layout),window.ps2id_special_params.offset&&(u.instances[c+"_instance_"+e].offset=window.ps2id_special_params.offset)),n.mPageScroll2id({scrollSpeed:u.instances[c+"_instance_"+e].scrollSpeed,autoScrollSpeed:"true"===u.instances[c+"_instance_"+e].autoScrollSpeed,scrollEasing:"true"===u.instances[c+"_instance_"+e].forceScrollEasing?"ps2id_"+u.instances[c+"_instance_"+e].scrollEasing:u.instances[c+"_instance_"+e].scrollEasing,scrollingEasing:"true"===u.instances[c+"_instance_"+e].forceScrollEasing?"ps2id_"+u.instances[c+"_instance_"+e].scrollingEasing:u.instances[c+"_instance_"+e].scrollingEasing,pageEndSmoothScroll:"true"===u.instances[c+"_instance_"+e].pageEndSmoothScroll,layout:u.instances[c+"_instance_"+e].layout,offset:g(u.instances[c+"_instance_"+e].offset.toString()),highlightSelector:u.instances[c+"_instance_"+e].highlightSelector,clickedClass:u.instances[c+"_instance_"+e].clickedClass,targetClass:u.instances[c+"_instance_"+e].targetClass,highlightClass:u.instances[c+"_instance_"+e].highlightClass,forceSingleHighlight:"true"===u.instances[c+"_instance_"+e].forceSingleHighlight,keepHighlightUntilNext:"true"===u.instances[c+"_instance_"+e].keepHighlightUntilNext,highlightByNextTarget:"true"===u.instances[c+"_instance_"+e].highlightByNextTarget,disablePluginBelow:f(u.instances[c+"_instance_"+e].disablePluginBelow.toString()),appendHash:"true"===u.instances[c+"_instance_"+e].appendHash,onStart:function(){"true"===t&&"selector"===mPS2id.trigger&&s++,"true"===a&&(r=[mPS2id.target.offset().top,mPS2id.target.offset().left])},onComplete:function(){"true"===a?r[0]===mPS2id.target.offset().top&&r[1]===mPS2id.target.offset().left||("selector"===mPS2id.trigger&&mPS2id.clicked.length?mPS2id.clicked.trigger("click.mPS2id"):o.mPageScroll2id("scrollTo",mPS2id.target.attr("id"))):1==s&&(mPS2id.clicked.length&&mPS2id.clicked.trigger("click.mPS2id"),s=0)},excludeSelectors:u.instances[c+"_instance_"+e].excludeSelector,encodeLinks:"true"===u.instances[c+"_instance_"+e].encodeLinks,liveSelector:u.instances[c+"_instance_"+e].selector+",."+h+","+S}),"true"===u.instances[c+"_instance_"+e].scrollToHash&&d&&p(d,"true"===u.instances[c+"_instance_"+e].scrollToHashForAll)){_(u.instances[c+"_instance_"+e].layout);var i=u.instances[c+"_instance_"+e].scrollToHashUseElementData,l=o("a._mPS2id-h[href$='"+d+"'][data-ps2id-offset]:not([data-ps2id-offset=''])").last();setTimeout(function(){"true"===i&&l.length?l.trigger("click.mPS2id"):o.mPageScroll2id("scrollTo",d),-1!==window.location.href.indexOf("#")&&(window.history&&window.history.replaceState?window.history.replaceState("","",d):window.location.hash=d)},u.instances[c+"_instance_"+e].scrollToHashDelay)}"true"===u.instances[c+"_instance_"+e].unbindUnrelatedClickEvents&&setTimeout(function(){var e=n.length?o._data(n[0],"events"):null,t=n.length?o._data(o(document)[0],"events"):null;e&&w(e,n),t&&w(t,n)},300),"true"===u.instances[c+"_instance_"+e].normalizeAnchorPointTargets&&o("a._mPS2id-t[id]:empty").css({display:"inline-block","line-height":0,width:0,height:0,border:"none"}),"true"===u.instances[c+"_instance_"+e].stopScrollOnUserAction&&o(document).on("mousewheel DOMMouseScroll touchmove",function(){var e=o("html,body");e.is(":animated")&&e.stop()})}}),o.extend(o.expr[":"],{absolute:o.expr[":"].absolute||function(e){return"absolute"===o(e).css("position")},relative:o.expr[":"].relative||function(e){return"relative"===o(e).css("position")},static:o.expr[":"].static||function(e){return"static"===o(e).css("position")},fixed:o.expr[":"].fixed||function(e){return"fixed"===o(e).css("position")},width:o.expr[":"].width||function(e,t,n){var s=n[3].replace("&lt;","<").replace("&gt;",">");return!!s&&(">"===s.substr(0,1)?o(e).width()>s.substr(1):"<"===s.substr(0,1)?o(e).width()<s.substr(1):o(e).width()===parseInt(s))},height:o.expr[":"].height||function(e,t,n){var s=n[3].replace("&lt;","<").replace("&gt;",">");return!!s&&(">"===s.substr(0,1)?o(e).height()>s.substr(1):"<"===s.substr(0,1)?o(e).height()<s.substr(1):o(e).height()===parseInt(s))}}),o.easing.ps2id_easeInQuad=o.easing.ps2id_easeInQuad||function(e){return e*e},o.easing.ps2id_easeOutQuad=o.easing.ps2id_easeOutQuad||function(e){return 1-(1-e)*(1-e)},o.easing.ps2id_easeInOutQuad=o.easing.ps2id_easeInOutQuad||function(e){return e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2},o.easing.ps2id_easeInCubic=o.easing.ps2id_easeInCubic||function(e){return e*e*e},o.easing.ps2id_easeOutCubic=o.easing.ps2id_easeOutCubic||function(e){return 1-Math.pow(1-e,3)},o.easing.ps2id_easeInOutCubic=o.easing.ps2id_easeInOutCubic||function(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2},o.easing.ps2id_easeInQuart=o.easing.ps2id_easeInQuart||function(e){return e*e*e*e},o.easing.ps2id_easeOutQuart=o.easing.ps2id_easeOutQuart||function(e){return 1-Math.pow(1-e,4)},o.easing.ps2id_easeInOutQuart=o.easing.ps2id_easeInOutQuart||function(e){return e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2},o.easing.ps2id_easeInQuint=o.easing.ps2id_easeInQuint||function(e){return e*e*e*e*e},o.easing.ps2id_easeOutQuint=o.easing.ps2id_easeOutQuint||function(e){return 1-Math.pow(1-e,5)},o.easing.ps2id_easeInOutQuint=o.easing.ps2id_easeInOutQuint||function(e){return e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2},o.easing.ps2id_easeInExpo=o.easing.ps2id_easeInExpo||function(e){return 0===e?0:Math.pow(2,10*e-10)},o.easing.ps2id_easeOutExpo=o.easing.ps2id_easeOutExpo||function(e){return 1===e?1:1-Math.pow(2,-10*e)},o.easing.ps2id_easeInOutExpo=o.easing.ps2id_easeInOutExpo||function(e){return 0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2},o.easing.ps2id_easeInSine=o.easing.ps2id_easeInSine||function(e){return 1-Math.cos(e*Math.PI/2)},o.easing.ps2id_easeOutSine=o.easing.ps2id_easeOutSine||function(e){return Math.sin(e*Math.PI/2)},o.easing.ps2id_easeInOutSine=o.easing.ps2id_easeInOutSine||function(e){return-(Math.cos(Math.PI*e)-1)/2},o.easing.ps2id_easeInCirc=o.easing.ps2id_easeInCirc||function(e){return 1-Math.sqrt(1-Math.pow(e,2))},o.easing.ps2id_easeOutCirc=o.easing.ps2id_easeOutCirc||function(e){return Math.sqrt(1-Math.pow(e-1,2))},o.easing.ps2id_easeInOutCirc=o.easing.ps2id_easeInOutCirc||function(e){return e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2},o.easing.ps2id_easeInElastic=o.easing.ps2id_easeInElastic||function(e){return 0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*(2*Math.PI/3))},o.easing.ps2id_easeOutElastic=o.easing.ps2id_easeOutElastic||function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*(2*Math.PI/3))+1},o.easing.ps2id_easeInOutElastic=o.easing.ps2id_easeInOutElastic||function(e){return 0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*(2*Math.PI/4.5))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*(2*Math.PI/4.5))/2+1},o.easing.ps2id_easeInBack=o.easing.ps2id_easeInBack||function(e){return 2.70158*e*e*e-1.70158*e*e},o.easing.ps2id_easeOutBack=o.easing.ps2id_easeOutBack||function(e){return 1+2.70158*Math.pow(e-1,3)+1.70158*Math.pow(e-1,2)},o.easing.ps2id_easeInOutBack=o.easing.ps2id_easeInOutBack||function(e){return e<.5?Math.pow(2*e,2)*(7.189819*e-2.5949095)/2:(Math.pow(2*e-2,2)*(3.5949095*(2*e-2)+2.5949095)+2)/2},o.easing.ps2id_easeInBounce=o.easing.ps2id_easeInBounce||function(e){return 1-t(1-e)},o.easing.ps2id_easeOutBounce=o.easing.ps2id_easeOutBounce||t,o.easing.ps2id_easeInOutBounce=o.easing.ps2id_easeInOutBounce||function(e){return e<.5?(1-t(1-2*e))/2:(1+t(2*e-1))/2}}(jQuery);
malihu-pagescroll2id.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Page scroll to id
4
  Plugin URI: http://manos.malihu.gr/page-scroll-to-id
5
  Description: Page scroll to id is an easy-to-use jQuery plugin that enables animated (smooth) page scrolling to specific id within the document.
6
- Version: 1.7.1
7
  Author: malihu
8
  Author URI: http://manos.malihu.gr
9
  License: MIT License (MIT)
@@ -47,7 +47,7 @@ if(!class_exists('malihuPageScroll2id')){ // --edit--
47
 
48
  class malihuPageScroll2id{ // --edit--
49
 
50
- protected $version='1.7.1'; // Plugin version --edit--
51
  protected $update_option=null;
52
 
53
  protected $plugin_name='Page scroll to id'; // Plugin name --edit--
@@ -611,9 +611,11 @@ if(!class_exists('malihuPageScroll2id')){ // --edit--
611
  $d2='true';
612
  $d3='easeInOutQuint';
613
  $d4='easeOutQuint';
 
614
  $d5='true';
615
  $d24='false';
616
  $d26='false';
 
617
  $d6='vertical';
618
  $d7=0;
619
  $d30='false';
@@ -646,9 +648,11 @@ if(!class_exists('malihuPageScroll2id')){ // --edit--
646
  $v2=(isset($_POST[$this->db_prefix.$i.'_autoScrollSpeed'])) ? 'true' : 'false';
647
  $v3=$_POST[$this->db_prefix.$i.'_scrollEasing'];
648
  $v4=$_POST[$this->db_prefix.$i.'_scrollingEasing'];
 
649
  $v5=(isset($_POST[$this->db_prefix.$i.'_pageEndSmoothScroll'])) ? 'true' : 'false';
650
  $v24=(isset($_POST[$this->db_prefix.$i.'_stopScrollOnUserAction'])) ? 'true' : 'false';
651
  $v26=(isset($_POST[$this->db_prefix.$i.'_autoCorrectScroll'])) ? 'true' : 'false';
 
652
  $v6=$_POST[$this->db_prefix.$i.'_layout'];
653
  $v7=$this->sanitize_input('text', $_POST[$this->db_prefix.$i.'_offset'], $d7);
654
  $v30=(isset($_POST[$this->db_prefix.$i.'_dummyOffset'])) ? 'true' : 'false';
@@ -712,9 +716,11 @@ if(!class_exists('malihuPageScroll2id')){ // --edit--
712
  $v24=(isset($j['stopScrollOnUserAction'])) ? $j['stopScrollOnUserAction']['value'] : $d24;
713
  $v25=(isset($j['normalizeAnchorPointTargets'])) ? $j['normalizeAnchorPointTargets']['value'] : $d25;
714
  $v26=(isset($j['autoCorrectScroll'])) ? $j['autoCorrectScroll']['value'] : $d26;
 
715
  $v27=(isset($j['scrollToHashUseElementData'])) ? $j['scrollToHashUseElementData']['value'] : $d27;
716
  $v28=(isset($j['scrollToHashRemoveUrlHash'])) ? $j['scrollToHashRemoveUrlHash']['value'] : $d28;
717
  $v31=(isset($j['encodeLinks'])) ? $j['encodeLinks']['value'] : $d31;
 
718
  break;
719
  default:
720
  $v0=$d0;
@@ -724,9 +730,11 @@ if(!class_exists('malihuPageScroll2id')){ // --edit--
724
  $v2=$d2;
725
  $v3=$d3;
726
  $v4=$d4;
 
727
  $v5=$d5;
728
  $v24=$d24;
729
  $v26=$d26;
 
730
  $v6=$d6;
731
  $v7=$d7;
732
  $v30=$d30;
@@ -849,6 +857,18 @@ if(!class_exists('malihuPageScroll2id')){ // --edit--
849
  'description' => 'Alternative animation easing (applied when a link is clicked while the page is animated/scrolling)',
850
  'wrapper' => null
851
  ),
 
 
 
 
 
 
 
 
 
 
 
 
852
  'pageEndSmoothScroll' => array(
853
  'value' => $v5,
854
  'values' => null,
@@ -885,6 +905,18 @@ if(!class_exists('malihuPageScroll2id')){ // --edit--
885
  'description' => null,
886
  'wrapper' => 'fieldset'
887
  ),
 
 
 
 
 
 
 
 
 
 
 
 
888
  'layout' => array(
889
  'value' => $v6,
890
  'values' => 'vertical,horizontal,auto',
@@ -1170,7 +1202,7 @@ if(class_exists('malihuPageScroll2id')){ // --edit--
1170
  //require_once(plugin_dir_path( __FILE__ ).'includes/mo-admin-notice.php');
1171
  // SEO notice class --edit--
1172
  // See also admin.php and admin.css for settings page banner
1173
- require_once(plugin_dir_path( __FILE__ ).'includes/seo-admin-notice.php');
1174
 
1175
  }
1176
  ?>
3
  Plugin Name: Page scroll to id
4
  Plugin URI: http://manos.malihu.gr/page-scroll-to-id
5
  Description: Page scroll to id is an easy-to-use jQuery plugin that enables animated (smooth) page scrolling to specific id within the document.
6
+ Version: 1.7.2
7
  Author: malihu
8
  Author URI: http://manos.malihu.gr
9
  License: MIT License (MIT)
47
 
48
  class malihuPageScroll2id{ // --edit--
49
 
50
+ protected $version='1.7.2'; // Plugin version --edit--
51
  protected $update_option=null;
52
 
53
  protected $plugin_name='Page scroll to id'; // Plugin name --edit--
611
  $d2='true';
612
  $d3='easeInOutQuint';
613
  $d4='easeOutQuint';
614
+ $d32='false';
615
  $d5='true';
616
  $d24='false';
617
  $d26='false';
618
+ $d33='false';
619
  $d6='vertical';
620
  $d7=0;
621
  $d30='false';
648
  $v2=(isset($_POST[$this->db_prefix.$i.'_autoScrollSpeed'])) ? 'true' : 'false';
649
  $v3=$_POST[$this->db_prefix.$i.'_scrollEasing'];
650
  $v4=$_POST[$this->db_prefix.$i.'_scrollingEasing'];
651
+ $v32=(isset($_POST[$this->db_prefix.$i.'_forceScrollEasing'])) ? 'true' : 'false';
652
  $v5=(isset($_POST[$this->db_prefix.$i.'_pageEndSmoothScroll'])) ? 'true' : 'false';
653
  $v24=(isset($_POST[$this->db_prefix.$i.'_stopScrollOnUserAction'])) ? 'true' : 'false';
654
  $v26=(isset($_POST[$this->db_prefix.$i.'_autoCorrectScroll'])) ? 'true' : 'false';
655
+ $v33=(isset($_POST[$this->db_prefix.$i.'_autoCorrectScrollExtend'])) ? 'true' : 'false';
656
  $v6=$_POST[$this->db_prefix.$i.'_layout'];
657
  $v7=$this->sanitize_input('text', $_POST[$this->db_prefix.$i.'_offset'], $d7);
658
  $v30=(isset($_POST[$this->db_prefix.$i.'_dummyOffset'])) ? 'true' : 'false';
716
  $v24=(isset($j['stopScrollOnUserAction'])) ? $j['stopScrollOnUserAction']['value'] : $d24;
717
  $v25=(isset($j['normalizeAnchorPointTargets'])) ? $j['normalizeAnchorPointTargets']['value'] : $d25;
718
  $v26=(isset($j['autoCorrectScroll'])) ? $j['autoCorrectScroll']['value'] : $d26;
719
+ $v33=(isset($j['autoCorrectScrollExtend'])) ? $j['autoCorrectScrollExtend']['value'] : $d33;
720
  $v27=(isset($j['scrollToHashUseElementData'])) ? $j['scrollToHashUseElementData']['value'] : $d27;
721
  $v28=(isset($j['scrollToHashRemoveUrlHash'])) ? $j['scrollToHashRemoveUrlHash']['value'] : $d28;
722
  $v31=(isset($j['encodeLinks'])) ? $j['encodeLinks']['value'] : $d31;
723
+ $v32=(isset($j['forceScrollEasing'])) ? $j['forceScrollEasing']['value'] : $d32;
724
  break;
725
  default:
726
  $v0=$d0;
730
  $v2=$d2;
731
  $v3=$d3;
732
  $v4=$d4;
733
+ $v32=$d32;
734
  $v5=$d5;
735
  $v24=$d24;
736
  $v26=$d26;
737
+ $v33=$d33;
738
  $v6=$d6;
739
  $v7=$d7;
740
  $v30=$d30;
857
  'description' => 'Alternative animation easing (applied when a link is clicked while the page is animated/scrolling)',
858
  'wrapper' => null
859
  ),
860
+ 'forceScrollEasing' => array(
861
+ 'value' => $v32,
862
+ 'values' => null,
863
+ 'id' => $this->db_prefix.$i.'_forceScrollEasing',
864
+ 'field_type' => 'checkbox',
865
+ 'label' => '',
866
+ 'checkbox_label' => 'Force scroll type/easing',
867
+ 'radio_labels' => null,
868
+ 'field_info' => null,
869
+ 'description' => 'Enable if the selected animation easing does not seem to take effect and/or there\'s conflict with other easing libraries and plugins',
870
+ 'wrapper' => 'fieldset'
871
+ ),
872
  'pageEndSmoothScroll' => array(
873
  'value' => $v5,
874
  'values' => null,
905
  'description' => null,
906
  'wrapper' => 'fieldset'
907
  ),
908
+ 'autoCorrectScrollExtend' => array(
909
+ 'value' => $v33,
910
+ 'values' => null,
911
+ 'id' => $this->db_prefix.$i.'_autoCorrectScrollExtend',
912
+ 'field_type' => 'checkbox',
913
+ 'label' => '',
914
+ 'checkbox_label' => 'Extend target position verification and scrolling adjustment for lazy-load scripts (images, iframes etc.) and changes in document\'s length',
915
+ 'radio_labels' => null,
916
+ 'field_info' => null,
917
+ 'description' => null,
918
+ 'wrapper' => 'fieldset'
919
+ ),
920
  'layout' => array(
921
  'value' => $v6,
922
  'values' => 'vertical,horizontal,auto',
1202
  //require_once(plugin_dir_path( __FILE__ ).'includes/mo-admin-notice.php');
1203
  // SEO notice class --edit--
1204
  // See also admin.php and admin.css for settings page banner
1205
+ //require_once(plugin_dir_path( __FILE__ ).'includes/seo-admin-notice.php');
1206
 
1207
  }
1208
  ?>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: page scrolling, page animation, smooth scroll, navigation, single-page navigation
5
  Requires at least: 3.3
6
  Tested up to: 5.6
7
- Stable tag: 1.7.1
8
  License: The MIT License (MIT)
9
  License URI: http://opensource.org/licenses/MIT
10
 
@@ -100,6 +100,12 @@ Because it works and it already has a ton of features. The plugin has little dep
100
 
101
  == Changelog ==
102
 
 
 
 
 
 
 
103
  = 1.7.1 =
104
 
105
  * Update plugin's settings page and notices.
@@ -274,6 +280,10 @@ Because it works and it already has a ton of features. The plugin has little dep
274
 
275
  == Upgrade Notice ==
276
 
 
 
 
 
277
  = 1.7.1 =
278
 
279
  Update plugin's settings page and notices.
4
  Tags: page scrolling, page animation, smooth scroll, navigation, single-page navigation
5
  Requires at least: 3.3
6
  Tested up to: 5.6
7
+ Stable tag: 1.7.2
8
  License: The MIT License (MIT)
9
  License URI: http://opensource.org/licenses/MIT
10
 
100
 
101
  == Changelog ==
102
 
103
+ = 1.7.2 =
104
+
105
+ * Added an extended "Verify target position and readjust scrolling" option for lazy-load images, iframes, changes in document's length etc.
106
+ * Added "Force scroll type/easing" option for dealing with conflicts with outdated easing libraries added by themes or other plugins.
107
+ * Updated plugin's settings page, contextual help and notices.
108
+
109
  = 1.7.1 =
110
 
111
  * Update plugin's settings page and notices.
280
 
281
  == Upgrade Notice ==
282
 
283
+ = 1.7.2 =
284
+
285
+ Added an extended 'Verify target position and readjust scrolling' option (for lazy-load images, iframes etc.), added 'Force scroll type/easing' option, updated plugin's settings page, contextual help and notices.
286
+
287
  = 1.7.1 =
288
 
289
  Update plugin's settings page and notices.