﻿$(document).ready(function() {

    SetJButton();

    try {
        if (Sys) {
            try {
                Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
            }
            catch (err) {

            }
        }
    }
    catch (e) {
    }

});



function EndRequestHandler(sender, args) {
    if (args.get_error() == undefined) {
        SetJButton();
    }
}

function SetJButton() {

    try {
        $('.jbutton').button();
        $('.jbutton-back').button();
        $('.jbutton-sub').button({ icons: { secondary: 'ui-icon-check'} });
        $('.jbutton-clr').button({ icons: { secondary: 'ui-icon-refresh'} });
    }
    catch (e) {
    }

}
