Cufon.replace('#nav a, #topnav a, h1, h2, .cufon', {hover:true});

$(document).ready(function(){
    $.backstretch("fileadmin/templates/images/background.jpg");
    
    /*
    var marginalheight = $('#marginal').height() + 120;
    var viewportheight = window.innerHeight ? window.innerHeight : $(window).height();
    if(marginalheight > viewportheight) {
        $('#col2_content').css({'position':'absolute'});    
    }
    */
    
    var theadlineheight = $('#col3_content #headline img').height();
    $('#col3_content #headline').css({'top': 140 - theadlineheight + 'px'});
    
    $('.tx-ikktourtermine-pi2 div.line:last').css({border: 'none'});
    
    $('input[type=checkbox],input[type=radio]').prettyCheckboxes();
    $('.inlineRadios input[type=radio]').prettyCheckboxes({'display':'inline'});
    
    $('div.radiorow label:last').css({'margin':'0 0 0 10px'});
    
    
    if ($.browser.msie && parseInt($.browser.version, 10) < 9){
        $("a[rel]").overlay();
    }
    else {
        // Animationen
        $("#col3 #teaser").hide();
        $("#col3 #headline").hide();
        setInterval (function () {
            $("#col3 #teaser").fadeIn("slow");
        }, 100);
        $("#col3 #headline").hide();
        setInterval (function () {
            $("#col3 #headline").fadeIn("fast");
        }, 600);
        
        $("a[rel]").overlay({mask: '#FFFFFF', fixed: true});    
    }

    /*
    window.fbAsyncInit = function() {
        FB.Canvas.setAutoResize();
    }
    */
});

