/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
function sendPasswordRequest( email )
{
    /* For automatic updating of the cart items in header section of page. */
    $.ajaxSetup ({cache: false});
    
    $.post('/application/actions/verify-user-email.php',
            {'email' : email},
            function( res )
            {
                myMess=res;
                //if(res == 'success')
                //{
                //    myMess="sent";                
                // startAlert('add-item-success');
                /*
                setTimeout(reloadBasket(), 5000);

                $('ul.small_basket').css({"display" : "block"});

                var h = Math.abs( $('ul.small_basket li').length * 81);
                $('ul.small_basket')
                        .animate({"height": h }, {
                                duration: 8000,
                                specialEasing: { height: 'easeInOutExpo' },
                                complete: function() { $(this).animate({"height": 0 }, { duration: 8000, specialEasing: { height: 'easeInOutExpo' } }); }
                        });
                */
                //}
                //else
                //{
                //    myMess="failed";
                //}
                var reloadRequest = reloadForgotPassword(myMess);
            }
        );
            
}

function reloadForgotPassword(mess)
{
    $.ajaxSetup ({cache: false});
    
    $.post('/application/includes/forgot-password.php',
            {
                'action' : mess
            },
            function( res )
            {
                $('#login-area div#header-forgotpass').fadeIn('normal',
                                                        function()
                                                        {
                                                            $('#login-area div#header-forgotpass').html(res);
                                                        }
                                                    );
            }
    );

    return true;
}


