$(document).ready(function() {

    $('#teaser-tabs li a:not(".active")').cufonWhite();
    $('#teaser-tabs li a.active').cufonGrey();

    $('#teaser-tabs li a').hover(function() {
        $(this).cufonGrey();
    }, function() {
        $(this).cufonWhite();
        $('#teaser-tabs li:first a.active').cufonGrey();
    });

    $('#teaser-tabs li').click(function(e) {
        $('#teaser-tabs li a').removeClass();
        $(this).find('a').addClass('active');
        e.preventDefault();
        var i = $('#teaser-tabs li').index(this);
        $('#teaser-tabs li a:not(".active")').cufonWhite();
        $(this).hover(function() {
            $(this).cufonGrey();
        }, function() {
            $(this).cufonGrey();
            $('#teaser-tabs li a:not(".active")').cufonWhite();
        });
        $('.teaserblock').hide();
        $('.teaserblock').eq(i).show();
    });
});

(function($) {
    $.fn.cufonWhite = function() {
        Cufon.replace(this, { fontFamily: 'OfficinaSansBookBold', textShadow: '0px 1px rgba(0, 0, 0, 0.3)', color: '#fff' });
    };
})(jQuery);
(function($) {
    $.fn.cufonGrey = function() {
    Cufon.replace(this, { fontFamily: 'OfficinaSansBookBold', textShadow: '0px 0px rgba(0, 0, 0, 0.01)', color: '#666' });
    };
})(jQuery);


