﻿
jQuery.fn.center = function($w)
{
    this.css("position", "absolute");
    this.css("top", ($w.height() - this.height()) / 2 + $w.scrollTop() + "px");
    this.css("left", ($w.width() - this.width()) / 2 + $w.scrollLeft() + "px");
    return this;
};

jQuery.fn.disable = function()
{
    this.attr('disabled', 'disabled');
};

jQuery.fn.enable = function()
{
    this.removeAttr('disabled');
};

jQuery.fn.dropDownLoadingStart = function(loadingString)
{
    this.disable();
    this.html("<option value='" + loadingString + "'>" + loadingString + "</option>");
};

jQuery.fn.dropDownLoadingEnd = function()
{
    this.enable();
};

