jQuery.fn.inlineOffset = function() {
    var el = $('<i/>').css('display','inline').insertBefore(this[0]);
    var pos = el.offset();
    el.remove();
    return pos;
};

jQuery.fn.disable = function()
{
	$(this).attr("disabled", "true");
};

jQuery.fn.enable = function()
{
	$(this).removeAttr("disabled");
};

jQuery.fn.readOnly = function()
{
	$(this).attr("readonly", "true");
};

jQuery.fn.readWrite = function()
{
	$(this).removeAttr("readonly");
};
