// This script runs after body of content is loaded
// If subhomepage does exist...
if ($("#subhomepage").length > 0) {
$('.subhomepageCentrecontent h2:first').replaceWith(function() {
return '
' + $(this).text() + '
';
});
$('.subhomepageCentrecontent h1:first').appendTo('#pageHeading');
$('.subhomepageCentrecontent h2').addClass('h2Fix');
}
// If subhomepage does not exist...
if ($("#subhomepage").length == 0) {
$('#contentpadding h1:first').appendTo('#pageHeading');
}
// Don't show group name if sitemap exists
if (($("#sitemap").length == 0) || ($("#subhomepage").length > 0) || ($("#removeSubtitle").length > 0)){
$('#groupName').css('display','none');
}
$('#headingContainer').css('display','block');
if (window.location.href.match("VIEW=INTL;")) {
$('.applySection .direct').css('display','none');
$('.applySection .VTAC').css('display','none');
}
if ($(".applySection").length > 0){
$('.applySection').css('float','none');
$('.applySection').css('margin-left','0');
$('.applySection').css('margin-right','0');
$('.applySection').appendTo('#programSecondColumn');
}
// Current pillar highlighting functionality
var pillarName = $.trim($('#breadcrumbs ul li:first-child + li').text());
var pageDepth = $('#breadcrumbs ul li').length;
if (pillarName == 'Study at RMIT') {
if (pageDepth == 2) {
$('.studyPillar').addClass('currentPillarTop');
} else {
$('.studyPillar').addClass('currentPillar');
}
} else if (pillarName == 'Life at RMIT') {
if (pageDepth == 2) {
$('.lifePillar').addClass('currentPillarTop');
} else {
$('.lifePillar').addClass('currentPillar');
}
} else if (pillarName == 'Research') {
if (pageDepth == 2) {
$('.researchPillar').addClass('currentPillarTop');
} else {
$('.researchPillar').addClass('currentPillar');
}
} else if (pillarName == 'Industry') {
if (pageDepth == 2) {
$('.industryPillar').addClass('currentPillarTop');
} else {
$('.industryPillar').addClass('currentPillar');
}
}
$('#sitemap li.tocCurrent').parent().prev('a').addClass('tocBack');
if ($('#sitemap li.tocCurrent').length == 0) { $('#sitemap li').addClass('tocChild'); }