1// Add construction so we can use normal jQuery style code.
2!function($) {
3	$(function(){
4    	//RC2013-10-28 "Binky" places discussion link in <bdi>.
5    	//The default Bootstrap CSS therefore won't color the "Discussion" and other links,
6    	//since it isn't a direct child of an <li>. So we simply remove all <bdi> tags.
7		$('bdi').contents().unwrap();
8
9		// Make the configuration page more readable
10		$('#config__manager tr > td.label').removeClass('label');
11
12		// add text-primariy to all header tags (h1,h2 etc) to the content
13		$('.page > :header').addClass('text-primary');
14
15		// make edit and other submit buttons to show in bootstrap style
16		$('input[type=\"submit\"], input[type=\"reset\"]').removeClass('button');
17		$('input[type=\"submit\"], input[type=\"reset\"]').addClass('btn btn-default btn-sm');
18		$('input[value=\"Edit\"][type=\"submit\"]').addClass('pull-right');
19
20		// Add sroll behavior to TOC
21		$('body').scrollspy({ target: '.bs-sidebar'});
22
23		// Put right width to the sidebar element. This is because it's "fixed" and therefor does not inherrit it's parents width
24		$('.bs-sidebar').css('width', $('.col-md-3').width() + 'px');
25	});
26
27	// Put right width to the sidebar element. This is because it's "fixed" and therefor does not inherrit it's parents width
28	// This will re-calibrate the width on resize
29	$(window).on('resize', function(){
30		$('.bs-sidebar').css('width', $('.col-md-3').width() + 'px');
31	});
32}(jQuery);
33
34
35