/**
 *	Location selector Plugin
 *
 *	@param: Object Array. Arguments need to be in object notation.
 *	Returns: jQuery.
 */

(function($) {
	
	$.fn.radioEnabler = function(settings){

		settings = jQuery.extend({
        	speedIn: "normal",
        	speedOut: "normal"
		}, settings );

		return this.each(function(){
			
			var theRadio = $(this);
			
			$(this).click(function(){

				$("input[@name="+theRadio.attr("id")+"]:checked").next('dl,ul').find("input,select,textarea").removeAttr("disabled");
				$("input[@name="+theRadio.attr("id")+"]:not(:checked)").next('dl,ul').find("input,select,textarea").attr("disabled","disabled");		
				
				$("input[@name="+theRadio.attr("id")+"]:checked").next('dl,ul').show();
				$("input[@name="+theRadio.attr("id")+"]:not(:checked)").next('dl,ul').hide();

			});
			
		});
	};
	
})(jQuery);
