$(document).ready(function(){
    if(!$.browser.msie) {
        $("#anchor_proto_interface").before("<a class='btn_toggle_description'>Hide interface description</a>");

        $("a.btn_toggle_description").click(function(){
                if( $(".proto_interface td.description").toggle().css("display")=="none" )
                    $("a.btn_toggle_description").text("Show interface description");
            else
                $("a.btn_toggle_description").text("Hide interface description");
        });

        $("#anchor_proto_code").before("<a class='btn_toggle_proto_code'>Show/hide code</a>");
        $("a.btn_toggle_proto_code").css("float", "right").click(function(){
            if( $(".proto_code_container").toggle().css("display")=="none" )
                $("a.btn_toggle_proto_code").text("Show proto code");
            else
                $("a.btn_toggle_proto_code").text("Hide proto code");

        });

        $("#anchor_proto_testcode").before("<a class='btn_toggle_test_code'>Show/hide code</a>");

        $("a.btn_toggle_test_code").click(function(){
            $(".proto_testcode_container").toggle();
        });
    }
});
