$(document).ready(function() {
        setFocus(); // Ustawiam focus na pole typu text
    });
 
function setFocus() {
    jQuery('#haslo').focus(function() {
        jQuery('#haslo').replaceWith('<input type="password" name="u_passwd" id="haslo" />');
        jQuery('#haslo').focus();
        jQuery('#haslo').blur(function(){
            if($(this).val() == '') { // Nie uzupełniono pola
                jQuery('#haslo').replaceWith('<input type="text" name="u_passwd" id="haslo" value="Hasło" />');
                setFocus(); // Ustawiam ponownie focus na pole typu text
            }
        });
    });
}
