// JavaScript Document

function ajaxLink(href, destination)
{
    $.ajax({
        type    :   "GET",
        url     :   $(href).attr("href"),
        success :   function(html){
            $(destination).html(html);
        }
    });
}

function submitForm(form, destination)
{
    
    $.ajax({
        type    :   $(form).attr("method"),
        url     :   $(form).attr("action"),
        cache   :   false,
        data    :   $(form).serializeArray(),
        success :   function(html){
            $(destination).html(html);
        }
    });
}

function updateModal(url, div)
{
    $.ajax({
        type    :   "GET",
        url     :   url,
        success :   function(html){
            $(div).html(html);
        }
    });
}
