(function(n,t){function i(){t.is("lg")?r():u()}function r(){var t=n(".post-body");n(".flow-menu").scrollToFixed({marginTop:10,limit:function(){return t.offset().top+t.outerHeight()-n(this).outerHeight(!0)-70},zIndex:999})}function u(){n(".flow-menu").trigger("detach.ScrollToFixed")}function f(){var t=n("meta[property='og:url']").attr("content"),i=n("meta[property='og:title']").attr("content"),r=n("meta[property='og:image']").attr("content"),u=n("meta[property='og:description']").attr("content");n(".soc-item.vk").click(function(n){Share.vk(t,i,r,u);n.preventDefault()});n(".soc-item.fb").click(function(n){Share.fb(t,i,r,u);n.preventDefault()});n(".soc-item.gp").click(function(n){Share.gp(t);n.preventDefault()});n(".soc-item.tw").click(function(n){Share.tw(t,i);n.preventDefault()});Share={vk:function(n,t,i,r){url="http://vk.com/share.php?";url+="url="+encodeURIComponent(n);url+="&title="+encodeURIComponent(t);url+="&description="+encodeURIComponent(r);url+="&image="+encodeURIComponent(i);url+="&noparse=true";Share.popup(url)},fb:function(n,t,i,r){url="http://www.facebook.com/sharer.php?s=100";url+="&t="+encodeURIComponent(t);url+="&summary="+encodeURIComponent(r);url+="&u="+encodeURIComponent(n);url+="&images="+encodeURIComponent(i);Share.popup(url)},tw:function(n,t){url="http://twitter.com/share?";url+="text="+encodeURIComponent(t);url+="&url="+encodeURIComponent(n);url+="&counturl="+encodeURIComponent(n);Share.popup(url)},gp:function(n){url="https://plus.google.com/share?";url+="url="+encodeURIComponent(n);Share.popup(url)},mailru:function(n,t,i,r){url="http://connect.mail.ru/share?";url+="url="+encodeURIComponent(n);url+="&title="+encodeURIComponent(t);url+="&description="+encodeURIComponent(r);url+="&imageurl="+encodeURIComponent(i);Share.popup(url)},popup:function(n){window.open(n,"","menubar=0,location=0,toolbar=0,status=0,width=626,height=450,top=50,left=50")}}}n(document).ready(function(){var r=document.querySelector(".flow-menu"),u=document.querySelector(".post-body"),f=new FlowMenu(r,u);i();n(window).resize(t.changed(function(){i()}))});f()})(jQuery,ResponsiveBootstrapToolkit);var FlowMenu=function(){function n(n,t){this.element=n;this.container=t;this.init()}return n.prototype.init=function(){for(var i,t=this.container.querySelectorAll(".numbered-card"),u=document.createElement("ul"),n=0,e=t.length;n<e;n++)if(i=t[n].querySelectorAll("h2,h3,h4,h5,h6"),i[0]!=null){var o=i[0].textContent,f=document.createElement("li"),r=document.createElement("a");r.innerHTML=o;f.appendChild(r);u.appendChild(f);t[n].id="numbered-card-n"+n.toString();r.href="#"+t[n].id}this.element.appendChild(u)},n}()