Script

(function($){
    $.fn.visiblePassBox = function(){
        $(this).each(function(){
            var passInput = $(this);
            var passVisible = $('<input type="text" value="" name="'+passInput.attr('name')+'" id="'+passInput.attr('id')+'_visible" />');
            var passCheck = $('<input type="checkbox" />');
            passInput.after(passCheck);
            
            passCheck.click(function(){
                if(this.checked){
                    passInput.replaceWith(passVisible.val(passInput.val()));
                }else{
                    passVisible.replaceWith(passInput.val(passVisible.val()));
                }
            });
        });
    }
})(jQuery);

jQuery(function($){
    $('#password').visiblePassBox();
});

Demo