{I" class:ETI"BundledAsset;FI"logical_path;TI"fae/subnavhighlighter.js;FI" pathname;TI"`/Library/WebServer/Documents/work/fine/_fae/app/assets/javascripts/fae/subnavhighlighter.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+7)ŸSI" length;Ti0I" digest;TI"%8b46aa3545eb397b4668ec5b4ba432ea;FI" source;TI"0// plugin have a checkbox in the thead of a table that controls that table column's checkboxes. // this should be placed on the containing TH of the master checkbox. var SubnavHighlighter = { settings: { subnavarea: ".main_content-header-section-links", active_class: "main_content-header-section-links-active", sections: ".main_content-section" }, init: function() { //only run everything if there is a subnav area if ($(this.settings.subnavarea).length > 0) { var that = this; //highlight the first one on page load this.scroller(); //makes the subnav clicks this.clicker(); this.resizer(); // need to add more padding to the bottom to help the scrolling $(this.settings.sections).last().css("min-height", $(window).height()); $(window).on("scroll.highlighter", function(){ that.scroller(); }); } }, resizer: function() { var that = this; $(window).on("resize", function(){ $(that.settings.sections).last().css("min-height", $(window).height()); }); }, scroller: function(){ var that = this; var count = $(this.settings.sections).length; $(this.settings.sections).each(function(index) { var position = $(this).position().top - 28 - $(window).scrollTop(); var $link = $("a[href=#" + $(this).attr("id") + "]").parent(); $link.removeClass(that.settings.active_class); if (position <= 0) { $link.addClass("js-highligher"); } else if (index === 0) { $link.addClass("js-highligher"); } }); $(".js-highligher").last().addClass(that.settings.active_class); $(".js-highligher").removeClass("js-highligher"); }, clicker: function() { // smooth scrolling on anchor links in the tab area. $(this.settings.subnavarea).find("a").on("click", function(e) { e.preventDefault(); Admin.scroller(this); }); } }; ;TI"required_assets_digest;TI"%202d16a1cfecc738953c51608d227186;FI" _version;TI"%64e62ddc273c2f5847f30d698ca14b67;F