$(document).ready(function(){
	new AjaxUpload('#wizard_uploader', {
		action: '/form/ajax_upload',
		responseType: "text/html",
		onSubmit : function(file , ext){
			if (ext && /^(doc|docx|rtf|pdf|txt)$/.test(ext)){
				//nothing?
			} else { // extension is not allowed
				notify("error","filetype",15000);
				return false; // cancel upload
			}
		},
		onComplete : function(file, json){
			var json = eval('(' + json + ')'); 
			if (json.type == "success") { //success
				$("#wizard_uploader").val(file);
			}
			notify(json.type,json.msg);			
		}		
	});
});