﻿
$(function() {
    UpdateUrls();
});

function UpdateUrls(){
    $('#AccountsGrid td a').each(function(){
        var url = $(this).attr('href') + '&htmlfragment=true&fn=' + fn;
        if( url.indexOf("loadcontent.aspx") > -1)
        {
            $(this).removeAttr('href');
            $(this).addClass("overcursor");
            $(this).click(function(){
                $("#results-content").html("<div id='loader'><img src='images/bigrotation2.gif /><span>Loading...</span></div>");
                $.ajax({
                    method: "get",
                    url: url,
                    dataType: "html",
                    success: function(data,text){
                        $("#results-content").html(data);
                        },
                    error: function(a,b,c){
                        $("#results-content").html("<div id='loader'><strong>Sorry there was an error loading this content</strong></div>");
                        }                    

                 });
                 
            });
        }
    });

}
