﻿// Top links actueel
(function($) {
    var current;

    $(document).ready(function() {
        current = $("#news #teaser img:first");
        current.show();

        $("#news a[class^=toplink]").each(function() {
            $(this).hover(clickHandler);
        });
    });

    function clickHandler(event) {
        var className = $(this).attr("class");
        var image = $("#teaser").find("." + className);

        if (current.attr("class") != className) {
            image.show();
            current.hide();
            current = image;
        }
    }
})(jQuery);
