/**handles:q2w3_fixed_widget**/
function q2w3_sidebar_init(){for(var e=0;e&lt;q2w3_sidebar_options.length;e++)q2w3_sidebar(q2w3_sidebar_options[e]);jQuery(window).on(&quot;resize&quot;,function(){for(var e=0;e&lt;q2w3_sidebar_options.length;e++)q2w3_sidebar(q2w3_sidebar_options[e])});var i=function(){for(var e=[&quot;WebKit&quot;,&quot;Moz&quot;,&quot;O&quot;,&quot;Ms&quot;,&quot;&quot;],i=0;i&lt;e.length;i++)if(e[i]+&quot;MutationObserver&quot;in window)return window[e[i]+&quot;MutationObserver&quot;];return!1}();0==q2w3_sidebar_options[0].disable_mo_api&amp;&amp;i?(q2w3Refresh=!1,new i(function(e){e.forEach(function(e){-1!=q2w3_exclude_mutations_array(q2w3_sidebar_options).indexOf(e.target.id)||e.target.className&amp;&amp;&quot;function&quot;==typeof e.target.className.indexOf&amp;&amp;-1!=e.target.className.indexOf(&quot;q2w3-fixed-widget-container&quot;)||(q2w3Refresh=!0)})}).observe(document.body,{childList:!0,attributes:!0,attributeFilter:[&quot;style&quot;,&quot;class&quot;],subtree:!0}),setInterval(function(){if(q2w3Refresh){for(var e=0;e0&amp;&amp;setInterval(function(){for(var e=0;e&lt;q2w3_sidebar_options.length;e++)q2w3_sidebar(q2w3_sidebar_options[e])},q2w3_sidebar_options[0].refresh_interval))}function q2w3_exclude_mutations_array(e){for(var i=new Array,o=0;o0)for(var t=0;t&lt;e[o].widgets.length;t++)i.push(e[o].widgets[t]),i.push(e[o].widgets[t]+&quot;_clone&quot;);return i}function q2w3_sidebar(e){if(!e)return!1;if(!e.widgets)return!1;if(e.widgets.length&lt;1)return!1;function i(){}e.sidebar||(e.sidebar=&quot;q2w3-default-sidebar&quot;);var o=new Array,t=jQuery(window).height(),n=jQuery(document).height(),r=e.margin_top;jQuery(&quot;#wpadminbar&quot;).length&amp;&amp;(r=e.margin_top+jQuery(&quot;#wpadminbar&quot;).height()),jQuery(&quot;.q2w3-widget-clone-&quot;+e.sidebar).remove();for(var s=0;s=0;s--)o[s]&amp;&amp;(o[s].next_widgets_height=a,o[s].fixed_margin_bottom+=a,a+=o[s].height,d||((d=widget_obj.parent()).addClass("q2w3-fixed-widget-container"),d.css("height",""),d.height(d.height())));jQuery(window).off("scroll."+e.sidebar);for(s=0;s&lt;o.length;s++)o[s]&amp;&amp;_(o[s]);function _(i){var o,r=i.offset_top-i.fixed_margin_top,s=n-e.margin_bottom;e.stop_id&amp;&amp;jQuery(&quot;#&quot;+e.stop_id).length&amp;&amp;(s=jQuery(&quot;#&quot;+e.stop_id).offset().top-e.margin_bottom),o=e.width_inherit?&quot;inherit&quot;:i.obj.css(&quot;width&quot;);var d=!1,a=!1,_=!1;jQuery(window).on(&quot;scroll.&quot;+e.sidebar,function(n){if(jQuery(window).width()&lt;=e.screen_max_width||jQuery(window).height()0&amp;&amp;jQuery("#"+i.clone_id).remove(),_=!0,d=!1,a=!1);else{var w=jQuery(this).scrollTop();w+i.fixed_margin_bottom&gt;=s?(a||(i.obj.css("position","fixed"),i.obj.css("top",""),i.obj.css("width",o),jQuery("#"+i.clone_id).length=r?d||(i.obj.css("position","fixed"),i.obj.css("top",i.fixed_margin_top),i.obj.css("bottom",""),i.obj.css("width",o),jQuery("#"+i.clone_id).length0&amp;&amp;jQuery("#"+i.clone_id).remove(),_=!0,d=!1,a=!1)}}).trigger("scroll."+e.sidebar)}}"undefined"!=typeof q2w3_sidebar_options&amp;&amp;q2w3_sidebar_options.length&gt;0?window.jQuery?q2w3_sidebar_options[0].window_load_hook?jQuery(window).load(q2w3_sidebar_init):"loading"!=document.readyState?q2w3_sidebar_init():document.addEventListener("DOMContentLoaded",q2w3_sidebar_init):console.log("jQuery is not loaded!"):console.log("q2w3_sidebar_options not found!");