(function($){
	jQuery.fn.Ajax = function(options) {
		options.ajax_url        = (!options.ajax_url)        ? ''     : options.ajax_url;
		var ajax_form           = (!options.ajax_form)       ? ''     : $(options.ajax_form).serialize();
		options.ajax_method     = (!options.ajax_method)     ? 'GET'  : options.ajax_method;
		options.ajax_dataType   = (!options.ajax_dataType)   ? 'json' : options.ajax_dataType;
		options.ajax_parameters = (!options.ajax_parameters) ? ''     : options.ajax_parameters;
		options.redirect        = (!options.redirect)        ? false  : options.redirect;
		options.div_response    = (!options.div_response)    ? false  : options.div_response;
		options.loader    		= (!options.loader)    		 ? false  : options.loader;
		
		if(options.loader) $(options.loader).show();
	    if(options.div_response) $(options.div_response).fadeOut('slow');
		
		$.ajax({
			type:options.ajax_method,
			url:options.ajax_url,
			dataType:options.ajax_dataType,
			data:ajax_form + options.ajax_parameters,
			complete:function() { if(options.loader) $(options.loader).hide(); },
			success:function(datas){ 
				if(datas != false && options.div_response){
					$(options.div_response).html(datas);
					$(options.div_response).fadeIn('slow');
				}
				else if(datas == false && options.redirect){
					window.location.href = options.redirect;
				}
				else {
					return false;
				}
			}
		});
	};
})(jQuery)