/home/arranoyd/telegastro/wp-content/plugins/Ultimate_VC_Addons/assets/min-js/sticky-section.min.js
jQuery(document).ready(function(C){var I=C(window),b=I.width(),j=-1;function t(){elements=C("div.ult-sticky-anchor"),elements.each(function(){var t=C(this),s=t.find(".ult-sticky"),a=s.data("mobile"),i=t.find(".ult-space");if(b<768&&"no"==a)return s.removeClass("ult-stick"),i.css("height",""),void t.removeClass("ult-permanent-flag");var e=I.scrollTop(),l=t.offset().top,r=I.height(),c=s.data("stick_behaviour"),n=s.data("support");if("stick_with_scroll_row"!=c&&"yes"!=n){var o=t.parent().width(),u=s.height(),d=s.data("gutter"),h=s.data("sticky_gutter_class"),f=s.data("sticky_gutter_id"),p=s.data("lr_position"),_=s.data("lr_value"),k=s.data("sticky_customwidth"),v=s.data("sticky_width"),w=s.data("sticky_position");d=Q(0,d,h,f),"top"==w?e=parseInt(e)+parseInt(d):(e=parseInt(e)+parseInt(r)-parseInt(u)-parseInt(d),l=parseInt(l)),"fullwidth"==v?o="100%":"customwidth"==v&&(o=k);var g={},y="width";g[w]=d,g[y]=o,"stick_permanent"==c&&(g[p]=_);var m={};m[w]="",m[y]="","stick_permanent"!=c||t.hasClass("ult-permanent-flag")||(t.addClass("ult-permanent-flag"),s.addClass("ult-stick").css(g)),"stick_with_scroll"==c&&l<e?(0,t.hasClass("ult-flag")&&0!=j||(t.addClass("ult-flag"),"fullwidth"==v?s.addClass("ult-stick-full-width").css(g):s.addClass("ult-stick").css(g),t.find(".ult-space").css("height",u),1)):"stick_with_scroll"==c&&t.hasClass("ult-flag")&&(t.removeClass("ult-flag"),"fullwidth"==v?s.removeClass("ult-stick-full-width").css(m):s.removeClass("ult-stick").css(m),t.find(".ult-space").css("height",""))}}),j=-1}function Q(a,t,s,i){if(s){var e=s.split(" ");jQuery.each(e,function(t,s){a=parseInt(a)+C(s).outerHeight()})}else s="null";if(i){var l=i.split(" ");jQuery.each(l,function(t,s){a=parseInt(a)+C(s).outerHeight()})}else i="null";return t=t?parseInt(t)+parseInt(a):a}C("div.ult-sticky-anchor").each(function(){var t=C(this),s=(t.closest(".ult_row_spacer"),t.find(".ult-sticky")),a=s.data("stick_behaviour"),i=s.data("support");if("stick_with_scroll_row"==a||"no"!=i){var e=s.data("gutter"),l=s.data("sticky_gutter_class"),r=s.data("sticky_gutter_id"),c=s.data("mobile");e=Q(0,e,l,r);var n=t.closest(".wpb_column").closest(".vc_row");t.parent().offset().top,t.addClass("ult_stick_to_row"),n.addClass("ult_s_container"),"yes"==i&&(n="body"),b<768&&"no"==c||t.fixTo(n,{top:e,useNativeSticky:!1})}}),t(),I.resize(function(){j=0,b=I.width(),t()}),I.bind("scroll",function(){t()})});