// ajax() and getJSON() are simple wrappers for jQuery's ajax functionality,
// but they automatically add auth info.
WidgetCommon = {
    'token':'',
    'ajax':function(options) {
        if( typeof(options['data']) == 'object' ) {
            options['data']['atoken'] = WidgetCommon.token;
        }
        jQuery.ajax(options);
    },
    'getJSON':function(url, options, func) {
        if( typeof(options) == 'object' ) { 
           options['atoken'] = WidgetCommon.token;
        }
        jQuery.getJSON(url, options, func);
    }
}
