function setstickysidebarstatus(a){!modernizr.mq("only screen and (max-width:"+avadasidebarsvars.content_break_point+"px)")&&math.floor(jquery("#content").height())>=math.floor(jquery("#main").height())?(jquery(".fusion-sidebar-left.fusion-sticky-sidebar .fusion-sidebar-inner-content").hasclass("fusion-sidebar-stuck")||jquery(".fusion-sidebar-left.fusion-sticky-sidebar .fusion-sidebar-inner-content").stick_in_parent({parent:"#main > .fusion-row",sticky_class:"fusion-sidebar-stuck",bottoming:!0,spacer:!1,offset_top:a}).on("sticky_kit:stick",function(a){var b=jquery(a.target);jquery("body").hasclass("double-sidebars")&&(b.css("margin-left","0"),b.parent().css({"margin-left":b.data("margin"),width:b.data("width")}))}).on("sticky_kit:unstick",function(a){var b=jquery(a.target);jquery("body").hasclass("double-sidebars")&&b.css("margin-left",b.data("margin"))}),jquery(".fusion-sidebar-right.fusion-sticky-sidebar .fusion-sidebar-inner-content").hasclass("fusion-sidebar-stuck")||jquery(".fusion-sidebar-right.fusion-sticky-sidebar .fusion-sidebar-inner-content").stick_in_parent({parent:"#main > .fusion-row",sticky_class:"fusion-sidebar-stuck",bottoming:!0,spacer:!1,offset_top:a}).on("sticky_kit:stick",function(a){var b=jquery(a.target);jquery("body").hasclass("double-sidebars")&&(b.css("margin-left","0"),b.parent().css({"margin-left":b.data("margin"),width:b.data("width")}))}).on("sticky_kit:unstick",function(a){var b=jquery(a.target);jquery("body").hasclass("double-sidebars")&&b.css("margin-left",b.data("margin"))})):(jquery(".fusion-sidebar-left.fusion-sticky-sidebar .fusion-sidebar-inner-content").trigger("sticky_kit:detach"),jquery(".fusion-sidebar-right.fusion-sticky-sidebar .fusion-sidebar-inner-content").trigger("sticky_kit:detach"))}function calcstickysidebaroffset(){var a=jquery("#wpadminbar").height()+50;return"top"===avadasidebarsvars.header_position&&"1"===avadasidebarsvars.header_sticky&&("v4"===avadasidebarsvars.header_layout||"v5"===avadasidebarsvars.header_layout?"menu_only"===avadasidebarsvars.header_sticky_type2_layout?a+=jquery(".fusion-secondary-main-menu").height():a+=jquery(".fusion-sticky-header-wrapper").height():"1"===avadasidebarsvars.sticky_header_shrinkage?a+=66:a+=jquery(".fusion-header").height()),a}jquery(document).ready(function(){var a,b=calcstickysidebaroffset();1<=jquery("#sidebar-2").length&&(a=jquery("#sidebar").css("float"),jquery("body").addclass("sidebar-position-"+a)),setstickysidebarstatus(b),jquery(window).on("resize",function(){b=calcstickysidebaroffset(),setstickysidebarstatus(b)})});