$(document).ready(function() {
    $(".overlaybox").overlay({});
});

function hidebox()
{
    $(".overlaybox").each(function(){
        $(this).overlay().close()
    });
}

function showFeedbackForm() {

    $.ajax( {
        type : "POST",
        url : "/Mains/feedbackform/",
        data : "",
        beforeSend : function(i) {
        },
        success : function(msg) {
            $("#overlayboxcontent").html(msg)
        }
    });
}

function showFeedbackSend() {
    $.ajax( {
        type : "POST",
        url : "/Mains/feedbacksend/",
        data : "email="+$("#feedbackemail").val()+"&body="+$("#feedbackbody").val()+"&path=" + window.location,
        beforeSend : function(i) {
        },
        success : function(msg) {
            $("#overlayboxcontent").html(msg)
        }
    });
}

function showLoginForm() {

    $.ajax( {
        type : "POST",
        url : "/Mains/showloginform/",
        data : "",
        beforeSend : function(i) {
        },
        success : function(msg) {
            $("#overlayboxcontent").html(msg)
        }
    });
}

function showRegisterForm() {

    $.ajax( {
        type : "POST",
        url : "/Mains/showregisterform/",
        data : "",
        beforeSend : function(i) {
        },
        success : function(msg) {
            $("#overlayboxcontent").html(msg)
        }
    });
}

function showRegister()
{
    $(function(){
        var api = $("#topregisterform").overlay({
            api:true
        });
        $(window).load(function() {
            api.load();
        });
    });
    $.ajax( {
        type : "POST",
        url : "/Mains/showregisterform/",
        data : "",
        beforeSend : function(i) {
        },
        success : function(msg) {
            $("#overlayboxcontent").html(msg)
        }
    });
}
