$(document).ready(function(){

    var url = document.location.href;
    if (url.indexOf('remindpassword') > 0) {
        $("#loginFormConteiner").hide();
        $("#remindFormConteiner").show();
        $("#userNameOrEmail").focus();
    }
    else {
        $("#userName").focus();
    }
    
    $("#btnLogin a").click(function(){
        $(".commentBoxError").remove();
        $(".commentBoxNotify").remove();
        $("#loginForm").submit();
        $("#loginForm").html('Trwa logowanie do systemu ...');
    });
    
    $("#btnRemindPass").click(function(){
        $("#remindPassForm").submit();
    });
 
	
	
    $('#remindFormConteiner').keyup(function(e){
        if (e.keyCode == 13) {
            $("#remindPassForm").submit();
        }
    });
    
    $('#loginFormConteiner').keyup(function(e){
        if (e.keyCode == 13) {
        $(".commentBoxError").remove();
        $(".commentBoxNotify").remove();
        $("#loginForm").submit();
        $("#loginForm").html('Trwa logowanie do systemu ...');
        }
    });
    
    $("#remindPassword").click(function(){
        $("#loginFormConteiner").hide();
        $("#remindFormConteiner").show();
        $("#userNameOrEmail").focus();
        return false;
    });
    
    $("#loginPanel").click(function(){
        $("#remindFormConteiner").hide();
        $("#loginFormConteiner").show();
        return false;
    });
    
    
});







