$(document).ready(function() {
    $("a.fancy").fancybox({
        'padding'               : 8,
        'overlayOpacity'        : 0.5,
        'overlayColor'          : '#000',
        'titlePosition'         : 'over'
    });

    $(".getoffer").selectbox({'animationSpeed':'fast'});
    $(".year").selectbox({'className':'jquery-year','animationSpeed':'fast'});
    $(".month").selectbox({'className':'jquery-month','animationSpeed':'fast'});
    $(".day").selectbox({'className':'jquery-day','animationSpeed':'fast'});

    $(".jquery-selectbox").width(183);
    $(".jquery-selectbox-list").width(173);

    $("form.contact .jquery-selectbox").width(266);
    $("form.contact .jquery-selectbox-list").width(256);

    $(".jquery-year").width(71);
    $(".jquery-year-list").width(61);

    $(".jquery-month").width(111);
    $(".jquery-month-list").width(101);

    $(".jquery-day").width(61);
    $(".jquery-day-list").width(51);

    resizeBackground();
});
$(window).resize(function(){
    resizeBackground();
});

function resizeBackground() {
    $("#images").width(2048);
	$("#images").css("left",(-(2048-$("#container").width())/2)+"px");
}

var humanist = {
    src: '/gfx/humanist.swf'
        ,ratios: [6, 1.41, 9, 1.35, 15, 1.29, 21, 1.25, 22, 1.22, 27, 1.24, 29, 1.21, 34, 1.22, 41, 1.21, 45, 1.2, 46, 1.21, 59, 1.2, 68, 1.19, 69, 1.2, 96, 1.19, 97, 1.18, 102, 1.19, 103, 1.18, 107, 1.19, 108, 1.18, 112, 1.19, 114, 1.18, 116, 1.19, 120, 1.18, 121, 1.19, 1.18]
};
sIFR.activate(humanist);
sIFR.replace(humanist, {
    selector: 'h1'
    ,wmode: 'transparent'
    ,css: {
        '.sIFR-root': { 'color': '#71001f' },
        'a': { 'color': '#71001f', 'text-decoration': 'none' },
        'a:hover': { 'color': '#71001f', 'text-decoration': 'underline' }
    }
});
