Team:WITS-CSIR SA/common.js
From 2011.igem.org
function RebuildHeader() {
var html = '<img src="" style="height: 90px; margin-left:30px; margin-top:20px;" alt="This must be edited. Still, a cool idea" /> | CSIR Wits |
$('#p-logo').empty().append(html); $('#top-section').css({ backgroundImage: 'url(https://static.igem.org/mediawiki/2011/5/53/Body_bg.gif)', backgroundColor: '#666666', backgroundRepeat: 'repeat-x', height: '155px' });
}
function SetEqualHeights(c){
var maxHeight = 0; $('div.' + c).each(function(){ maxHeight = Math.max($(this).height(), maxHeight); });
$('div.' + c).height(maxHeight + 50);
}
function RemoveTitle(){
$('.firstHeading').eq(0).remove();
}
function StyleBody(){
$('body').addClass('ui-widget-content'); $('#bodyContent, #content').css({ backgroundColor: '#2e2e2e', backgroundImage: 'url(https://static.igem.org/mediawiki/2011/0/09/BackgroundBody.jpg)' }); $('table').css('background-color', 'transparent'); $('#catlinks').css({'background-color': 'transparent', border:'none'}).addClass('ui-widget-header ui-corner-all'); var html = $('#footer-box').html(); $('#footer-box').remove(); $('#catlinks').html(html); $('body').css({ 'overflow-x': 'hidden', 'overflow-y': 'visible' });
}
$(function() {
RebuildHeader(); RemoveTitle(); StyleBody(); SetEqualHeights('equalHeights'); SetEqualHeights('infoBox');
});