!function(o){o(document).ready(function(){o(window);var t=o(document.body),n=o(".doc-container").find(".doc-nav");n.affix({offset:{top:function(){return 65},bottom:function(){return 150}}}),t.scrollspy({target:".doc-sidebar"}),o(".doc-nav > li").find("ul").each(function(){o(this).parent().append('<span class="toggle-button">+</span>')}),o(".toggle-button").on("click",function(){o(this).parent().toggleClass("opened")}),n.find("> li > a").before(o('<span class="docs-progress-bar" />'));n.offset().top;o(window).scroll(function(){o(".doc-nav").height();var t=o(this).scrollTop(),n=o(this).innerHeight(),e=o(".doc-nav > li").filter(".active").index();o(".docs-section").each(function(i){var c=o(this).offset().top,s=o(this).height(),a=c+s,r=0;t>=c&&t<=a?(r=(t-c)/s*100)>=100&&(r=100):t>a&&(r=100),a<t+n-70&&(r=100);var d=o(".doc-nav .docs-progress-bar:eq("+i+")");e>i&&d.parent().addClass("viewed"),d.css("width",r+"%")})})})}(jQuery),$(document).ready(function(){$("a[rel^='prettyPhoto']").prettyPhoto()});
