$(function() {
    $('#individual hr:last').hide();
    $('#major hr:last').hide();
    if ($('body.admin').length) {
        $('a.delete').click(function(event) {
            event.preventDefault();event.stopPropagation();
            var tr = $(this).parents('tr');
            if (confirm('このデータを削除します。よろしいですか?')) {
                $.post($(this).attr('href'), function() {
                    tr.fadeOut("slow", function() {tr.remove();});
                });
            }
        });
    }
    if ($('body.admin').length) {
        $('#gNavi li a').each(function(i, elem) {
            if ($(this).attr('class') == $('body').attr('id')) $(this).addClass('current');
        })
    }
    
    if ($('body#contribution, body#experience').length) {
        $('.btn img, .btn input').hover(function() {
            $(this).fadeTo("fast", 0.6);
        }, function() {
            $(this).fadeTo("fast", 1);        
        })
    }
});

