$(document).ready(function() {
    $('#skin-secondary-nav li:first').attr("id", "community-nav");
    $('#skin-secondary-nav li:nth-child(2)').attr("id", "showcar-nav");
    $('#skin-secondary-nav li:nth-child(3)').attr("id", "multimedia-nav");
    $('#skin-secondary-nav li:nth-child(4)').attr("id", "car-nav");
    $('#skin-secondary-nav li:nth-child(5)').attr("id", "team-nav");
    $('#skin-secondary-nav li:nth-child(6)').attr("id", "drivers-nav");
    $('#skin-secondary-nav li:nth-child(7)').attr("id", "news-nav");
    $('#skin-secondary-nav li:nth-child(8)').attr("id", "seasons-nav");

});

var din = { src: 'http://racing.redbull.com/flash/din-mittelschrift.swf' };

sIFR.useDomLoaded = false;
sIFR.repaintOnResize = false;

sIFR.activate(din);

redraw();
function redraw() {
    sIFR.replace(din, {
        selector: 'div.section-header h3, #article #main-content h2 span, #article #secondary-content #article-information h3 span, #article #secondary-content #related-content h3 span, #featured-content .featured-article-item h3, #video-information h3 span, #video #related-content h3, #video #comments h3, #image-information h3 span, #image #secondary-content #related-content h3 span, #event-information h3 span, #comments h3 span',
        css: [
	'.sIFR-root { background-color: #001E40; color: #FFFFFF; text-transform:uppercase;}',
	'a {color: #ffffff; text-decoration: none;}',
	'a:hover {color:#ffffff; text-decoration: none;}'
	],
        selectable: true,
        fitExactly: true,
        preventWrap: true,
        forceSingleLine: true,
        offsetTop: '0',
        wmode: 'transparent'
    });

    sIFR.replace(din, {
        selector: 'ul#skin-secondary-nav li',
        css: [
	'.sIFR-root { background-color: #001E40; color: #FFFFFF; text-transform:uppercase;}',
	'a {color: #ffffff; text-decoration: none;}',
	'a:hover {color:#f50024; text-decoration: none;}'
	],
        selectable: true,
        fitExactly: true,
        preventWrap: true,
        forceSingleLine: true,
        offsetTop: '3',
        wmode: 'transparent'
    });

    sIFR.replace(din, {
        selector: 'ul#skin-secondary-nav li.On',
        css: [
        '.sIFR-root { background-color: #001E40; color: #f50024; text-transform:uppercase;}',
        'a { text-decoration:none; color:#f50024 }',
        'a:hover { text-decoration:none; color:#f50024 }'
       ],
        selectable: true,
        fitExactly: true,
        preventWrap: true,
        forceSingleLine: true,
        offsetTop: '3',
        wmode: 'transparent'
    });
}
