define(function(require){
	var $ = require('jquery');
    require('uriTemplate')($);
    require('dialog')($);
    require('form')($); 
    require('multiFile')($)
	var IFA = require('util');  
	$('#attachmentForm').ajaxForm({success:function(){
		$.msg.alert("上传成功！");
	}});
//	$('#uploadHref').click(function(){
//		alert("111");
//		$('#attachmentForm').submit();
//	});
	 $('#emailAttachment').MultiFile({
		 list:'#emailAttachment_list',
		 STRING: {
				remove:'删除',
				denied:'You cannot select a $ext file.\nTry again...',
				file:'$file',
				selected:'File selected: $file',
				duplicate:'$file 已经选择过了！'
			},
			onFileAppend: function(element, value, master_element){
				$('#F9-Log').append('<li>onFileAppend - '+value+'<>')
				},
				onFileSelect: function(element, value, master_element){
					alert(element["files"]["0"]["size"]);
				$('#F9-Log').append('<li>onFileSelect - '+value+'<>')
				},
	 });
});