$(document).ready( function() {
addDocVersions();
highlightCurrentDocVersion();
});
function addDocVersions() {
var parts = window.location.pathname.split('/');
var page = parts.length > 0 ? parts[parts.length-1].slice(0,-5) : '';
var hash = window.location.hash.slice(1);
var topic = (page=='manual' && hash) ? hash : page;
var newhash = (page=='manual' && topic!='manual') ? ('#'+topic) : '';
var newpage = page=='manual' ? page : topic;
$('.docversions').html('Available versions: \
dev \
| 1.1 \
| 1.0 \
| 0.27 \
');
}
function highlightCurrentDocVersion() {
$('.docversions').each( function() {
var parts = window.location.pathname.split('/');
var dir = parts.length > 1 ? parts[parts.length-2] : '';
var ver = $.isNumeric(dir) ? dir : 'dev';
$(this).find('a').each( function() {
if ($(this).html() == ver)
$(this)
// .removeAttr('href')
// .css('text-decoration', 'none')
// .css('color', 'initial')
.css('font-weight','bold')
// .hide()
;
});
});
}