(function (a) {
    a.fn.credits = function () {
        var b = this;
        a(".on", b).css("display", "none");
        a(b).css("cursor", "default").data("txt_on", a(".on", b).html()).data("txt_out", a(".out", b).html());
        a(b).hover(function () {
            a(".out", b).fadeTo("fast", 0, function () {
                a(this).html(a(b).data("txt_on"));
                a(this).fadeTo("fast", 1)
            })
        }, function () {
            a(".out", b).fadeTo("fast", 0, function () {
                a(this).html(a(b).data("txt_out"));
                a(this).fadeTo("fast", 1)
            })
        })
    }
})(jQuery);
$(function () {
    if($("div#main_title div#credit").credits)
    {
    	$("div#main_title div#credit").credits();
    }
    $('a[href^="mailto"], .email').each(function () {
        if ($(this).html().indexOf("_à_", 0) > 0) {
            $(this).html($(this).html().replace(/_à_/i, "@"));
            $(this).attr("href", "mailto:" + $(this).html())
        } else {
            if ($(this).html().indexOf("_&agrave;_", 0) > 0) {
                $(this).html($(this).html().replace(/_&agrave;_/i, "@"));
                $(this).attr("href", "mailto:" + $(this).html())
            }
        }
    });
    $("img.credits").each(function () {
        $(this).wrap('<div class="img-desc"></div>').after("<cite>" + $(this).attr("alt") + "</cite>")
    })
});
