$(document).ready(function()
{   
    var configClassName = "";
    
    configClassName = $("input[name='configoption["+configOptionId+"]']" ).parent().attr("class");
    
    if(/iradio/.test(configClassName))
    {
        //for icheckbox
        
        $("input[name='configoption["+configOptionId+"]']" ).on("ifChecked", function()
        {
            if($(this).val()== configSubOptionId)
            {
                //new SIM cards
                $("input[name='customfield["+customfiledIdExisting+"]']" ).attr("disabled","disabled");
            }
            else
            {
                $("input[name='customfield["+customfiledIdExisting+"]']" ).removeAttr("disabled");
            }
        });
    }
    else
    {
        //for normal checkbox
        $("input[name='configoption["+configOptionId+"]']" ).click(function()
        {
            if($(this).val()== configSubOptionId)
            {
                $("input[name='customfield["+customfiledIdExisting+"]']" ).attr("disabled","disabled");
            }
            else
            {
                $("input[name='customfield["+customfiledIdExisting+"]']" ).removeAttr("disabled");
            }
        });
    }
    
});
