﻿
function fixSP2007Styles() {
    fixSiteActionsButton();
    fixSortableHeaders();
}

function fixSortableHeaders() {
    $('.ms-vh > div').each(function() {
        var $this = $(this);
        if ($this.css('position') == 'relative') {
            $this.css('position', 'static');
            $this.find("td").each(function() {
                var $this2 = $(this);
                if ($this2.css('position') == 'absolute')
                    $this2.css('position', 'relative');
            });
        }
    });
    $('.ms-vh2 > div').each(function() {
        var $this = $(this);
        if ($this.css('position') == 'relative') {
            $this.css('position', 'static');
            $this.find("td").each(function() {
                var $this2 = $(this);
                if ($this2.css('position') == 'absolute')
                    $this2.css('position', 'relative');
            });
        }
    });
}

function fixSiteActionsButton() {
    $('.ms-bannerframe td').each(function() {
        var $this = $(this);
        if ($this.css('position') == 'relative')
            $this.css('position', 'static');
    });
}
