 $(document).ready(function(){
        // first capture the initial click and bind a custom function to it
        $('#password1').bind('focus',fieldcheck);
        
        function fieldcheck(el){
            if($(this).attr('type')=='text'){
                $(this).val('');
                $(this).replaceWith('<input type="password" name="password" id="password1" />')
                $('#password1').focus();
                $('#password1').bind('blur',fieldcheck);
                
            }
            
            if($(this).attr('type')=='password'){
                if($(this).val()==''){
                    $('#password1').replaceWith('<input type="text" name="password1" id="password1" value="Password" />');
                    $('#password1').bind('focus',fieldcheck);
                }
            }
        }
       
    });
