﻿jQuery(document).ready(function() {


    $(".HDLSIGNIN").click(function() {
        var membername = $(".MEMBERNAME").attr("value");
        var nextpage = $(this).attr("nextpage");
        document.location.href = "/account.page/login?fullname=" + membername + "&activeprofile=true&nextpage=" + nextpage;
        //alert("Hellos");
        //alert($(this).attr("nextpage"));
        //$("#SignInModal").show();
        //FR.modalPopups.find('SignInBehaviour').show();

    });

    $(".row_buttonlink").click(function() {
    var membername = $(".MEMBERNAME").attr("value");
    var nextpage = $(".NEXTPAGE").attr("value");
    document.location.href = "/account.page/login?fullname=" + membername + "&activeprofile=true&nextpage=" + nextpage;
        //alert($(this).attr("nextpage"));
        //FR.modalPopups.find('SignInBehaviour').show();
    });

    $("#CancelPopup").click(function() {
        FR.modalPopups.find('SignInBehaviour').hide();
    });
    $("#SignIn").click(function() {
        $("Form").trigger("submit");
        //        $.ajax({
        //            type: "POST",
        //            url: "http://localhost:1213/fruaccount.page/authenticate",
        //            data: "{Email:'Mahen@friendsreunited.co.uk',Password:'Nikil',Guid:'122114737',CurrentPage:'profile.aspx',NextPage:'profile.aspx',Domain:'localhost:1212',PostPath:'profile.aspx',RememberMe:'false'}",
        //            contentType: "application/json; charset=utf-8",
        //            dataType: "json",
        //            success: function(msg) {
        //                alert(msg.d);
        //                FR.modalPopups.find('SignInBehaviour').hide();

        //            }
        //        });
    });
    $("Form").submit(function() {
        alert('prevent submit');
        return false;
    });
    $("#aspnetForm").submit(function() {
        alert('prevent aspnetForm submit');
        return false;
    });
});




