$(document).ready(function () {
    var currentpath = window.location.pathname;
    if (currentpath == "/payment-confirmation.aspx") {
        setTimeout(function () {
            var frm = getUrlVars()["frm"];
            var payment = getUrlVars()["payment"];
            if (frm.toUpperCase() == "APPOINTMENT" && payment == "Pt96AhtMkjwjtz") {
                window.location.href = "http://www.WeGrow.co.in/book-appointment.aspx";
            }
            else if (frm.toUpperCase() == "IDEAVALIDATION" && payment == "En6eAtmME7w6gz") {
                window.location.href = "http://www.WeGrow.co.in/idea-validation.aspx";
            }
            else {
                window.location.href = "http://www.WeGrow.co.in";
            }
        }, 3000);
    }
    
    
});

function getUrlVars() {
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for (var i = 0; i < hashes.length; i++) {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    return vars;
}