
jQuery(function() {
    var textInputs = [
        'div.input input[type=text]', 
        'div.input input[type=password]', 
        'div.input textarea'
    ];
    
    var checkboxInputs = [
        'div.input input[type=checkbox]', 
        'div.input input[type=radio]'
    ];
    
    jQuery(textInputs.join(',')).addClass('text-input');
    jQuery(checkboxInputs.join(',')).addClass('checkbox-input');
});

jQuery.fn.makeWaiting = function(options)
{
    settings = jQuery.extend({
	   image: baseUrl + '/images/ajax/waiting_small.gif'
	}, options);
	return this.each(function() {
	    jQuery(this).after('<img src="' + settings.image + '" class="waiting" alt="" style="vertical-align:middle;margin-left:3px;" />');
        this.disabled = true;
    });
}

jQuery.fn.stopWaiting = function(options)
{
    return this.each(function() {
	    jQuery(this).next().remove();
        this.disabled = false;
    });
}

