| Server IP : 89.108.64.180 / Your IP : 216.73.216.253 Web Server : Apache/2.4.41 (Ubuntu) System : Linux 89-108-64-180.cloudvps.regruhosting.ru 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : www-root ( 1010) PHP Version : 8.0.30 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/fl-brief.agast.ru/wp-content/themes/hotel-lux/js/ |
Upload File : |
/**
* @package WordPress
* @subpackage Hotel LUX
* @version 1.0.9
*/
/**
* Smooth Sticky
* v1.0.3
**/
!function(E){var c=Object.assign?Object.assign:function(t){for(var e=1;e<arguments.length;e+=1){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},h={add:function(t,e,o,n){o=o||!1;var i=s(e);this[t]||(this[t]={}),this[t][i]||(this[t][i]=!0,E.addEventListener(t,e,o),n&&e())},remove:function(t,e,o){var n=s(e);this[t]&&this[t][n]&&(E.removeEventListener(t,e,!1),delete this[t][n],o&&e())}},f=function(){for(var t="transform webkitTransform MozTransform OTransform msTransform".split(" "),e=document.createElement("div"),o=0;o<t.length;o+=1)if(e&&void 0!==e.style[t[o]])return t[o];return!1}();function S(t,e){var o=t.getBoundingClientRect(),n=E.pageYOffset;return{top:Math.floor(o.top+n),bottom:Math.floor(o.bottom+n),left:Math.floor(o.left),right:Math.floor(o.right),width:Math.floor(o.width),outerWidth:Math.floor(o.width+(parseFloat(e["margin-left"])+parseFloat(e["margin-right"]))),height:Math.floor(o.height+(parseFloat(e["padding-top"])+parseFloat(e["padding-bottom"])))}}function s(t){return t.name||t.constructor.name}function T(){for(var t=0,e=arguments,o=0;o<e.length;o+=1)t+=parseFloat(e[o]);return t}function w(t,e){return Math.max(t,e)-Math.min(t,e)}E.smoothSticky=function(t,e){var o={offsetTop:0,scroll_delay:66,scroll_timeout_fn:null,onScroll:new Function,resize:{min_width:768},method_sticky:"transform",indent_top:0,indent_bottom:0},n={data:{scroll:E.pageYOffset},session:{page_y_offset:E.pageYOffset},sticky_all:function(t){for(var e=(void 0,"string"===typeof t?document.querySelectorAll(t):Array.isArray(t)?t:t.tagName?[t]:!!t.item&&t),o=[],n=0;n<e.length;n+=1){var i=e[n];o.push({element:i,parent:i.parentElement,parent_class:i.parentElement.classList.value,style:getComputedStyle(i),parent_style:getComputedStyle(i.parentElement)})}return o}(t),sticky_all_off:[],options:c(o,e),init:function(){0<this.sticky_all.length&&h.add("resize",this.generalEventResize.bind(this),!1,!0)},generalEventResize:function(){if(this.sticky_all_off.length<=0&&E.innerWidth<=1024)for(var t=0;t<this.sticky_all.length;t+=1){var e=this.sticky_all[t];e&&e.parent_class.match(/cmsmasters_121414|cmsmasters_14141414|cmsmasters_141412/g)&&(this.sticky_all_off.push(e),M.setNull(e.element),delete this.sticky_all[t])}else 0<this.sticky_all_off.length&&1024<E.innerWidth&&(this.sticky_all=this.sticky_all.concat(this.sticky_all_off),this.sticky_all_off=[]);this.options.resize.min_width>=E.innerWidth?(h.remove("scroll",i,!0),h.remove("resize",s,!0)):(h.add("scroll",i,!1,!0),h.add("resize",s,!1,!0))},doScrollEnd:function(){this.scrollEnd(this.stickyRunMove.bind(this))},doMove:function(){for(var t,e,o,n,i,s,r=this.data.scroll,l=r+this.options.offsetTop,a=E.innerHeight,c=r+a,h=this.session.page_y_offset>r,f=0;f<this.sticky_all.length;f+=1){var p=this.sticky_all[f];if(p){var m=p.parent,u=p.element,_=(t=u,e=m,o=getComputedStyle(t),n=getComputedStyle(e),i=S(t,o),s=S(e,n),{current:i,current_style:o,parent:s,parent_style:n,top_rel:i.top-s.top,last_bottom:s.height-i.height-parseFloat(o["margin-bottom"])}),d=_.current.top-_.parent.top,g=w(_.current.top,l),y=_.top_rel,v=_.current.width+T(p.style.marginLeft,p.style.marginRight);if(_.parent.width+T(p.parent_style.marginLeft,p.parent_style.marginRight)<=v||_.current.height>=_.parent.height)M(u,0);else{if(h&&_.current.top>l&&_.current.top>_.parent.top){var b=d-g+this.options.indent_top;y=0<b&&b<_.last_bottom?b:_.last_bottom<b?_.last_bottom:0}else if(!h&&_.current.bottom<c&&_.parent.top<l){var k=w(c,_.current.bottom)+_.top_rel-this.options.indent_bottom;y=_.current.height>a-this.options.offsetTop-this.options.indent_bottom?c<_.parent.bottom?Math.max(k,0):_.last_bottom:document.documentElement.scrollHeight<=c?_.last_bottom:Math.min(k-(a-this.options.offsetTop-_.current.height)+(this.options.indent_top+this.options.indent_bottom),_.last_bottom)}y!=_.top_rel?M(u,y):_.current.bottom>_.parent.bottom&&M(u,_.last_bottom)}}}this.session.page_y_offset=r},stickyRunMove:function(){this.data.scroll=E.pageYOffset,this.options.onScroll.bind(this)(),this.doMove()},scrollEnd:function(t){this.options.scroll_timeout_fn&&clearTimeout(this.options.scroll_timeout_fn),this.options.scroll_timeout_fn=setTimeout(t,this.options.scroll_delay)}},M=function(t){switch(t){case"transform":case"translate":return a;case"margin":case"margin-top":return r;case"top":return l;default:return a}}(n.options.method_sticky);function i(){n.doScrollEnd()}function s(){setTimeout(function(){n.session.page_y_offset+=2,n.doScrollEnd(),setTimeout(function(){n.session.page_y_offset-=3,n.doScrollEnd()},200)},200)}function r(t,e){t.style.marginTop=e+"px"}function l(t,e){t.style.top=e+"px"}function a(t,e){t.style[f]="translate(0px, "+e+"px)"}return r.__proto__.setNull=function(t){t.style.marginTop=""},l.__proto__.setNull=function(t){t.style.top=""},a.__proto__.setNull=function(t){t.style[f]=""},n.init(),n},E.jQuery&&(E.jQuery.fn.smoothSticky=function(t){return E.smoothSticky(this.toArray(),t)})}(window);