﻿/// <reference path="~/Scripts/jquery-1.3.2-vsdoc.js"/>
$(function() {
    $(".currency").each(function() {
        var value = parseFloat(this.innerHTML);
        var process = $(this);
        var from = process.attr("from");
        var to = process.attr("to");
        var sign = process.attr("sign");
        var target = this;
        $.ajax(
            {
                type: "post",
                data: { "from": from, "to": to, "amount": value },
                url: 'Convert.htm',
                success: function(data, textStatus) { target.innerHTML = sign + data; },
                dataType: "json"
            }
            );
    });
});

function updateDisplay(data, textStatus) {
    alert(data);
}