﻿Type.registerNamespace("majax");

majax.RoundedCorners = function() {
    majax.RoundedCorners.initializeBase(this);
}

majax.RoundedCorners.prototype = {

    initialize : function() {
        majax.RoundedCorners.callBaseMethod(this, 'initialize');

        //  attach the plugin
        Sys.UI.Control.prototype.round = this._round;
    },


    dispose : function() {

        majax.RoundedCorners.callBaseMethod(this, 'dispose');
    },

    _round : function(radius) {
        $create(AjaxControlToolkit.RoundedCornersBehavior, {"Radius":radius}, null, null, this.get_element());        
    }
}

//  register the class
majax.RoundedCorners.registerClass('majax.RoundedCorners', Sys.Component);

//  create the singleton
$create(majax.RoundedCorners, null, null, null);

// Since this script is not loaded by System.Web.Handlers.ScriptResourceHandler
// invoke Sys.Application.notifyScriptLoaded to notify ScriptManager 
// that this is the end of the script.
if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();