

$(document).ready( function() {

$('#FILE_Uploader').LabXUploader({
		fileType: { 
			Type: "PDF",
			Icon: "/core/images/icons/attach_pdf.png",
			Ext: "pdf"
		},
		url: "/?fa=coreUtilities.uploadFile&uploadFileFieldName=uploadForumPostAttachment",
		fileFieldName: "uploadForumPostAttachment",	
		titleFieldName: "title",
		additionalFieldBefore: true

	});
$('.btnFile_Remove').live("click", function() {
		var _this = $(this).parents('.LabXUploaderUserInputGroup');
		$.ajax({
			type: "post",
			url: "?home.removeForumPostAttachment&uploadFileFieldName=uploadForumPostAttachment",
			data: '&photoKey=' + _this.find('.thisFileName').val()
		}); // CLOSE .ajax	
		_this.slideUp(300, function() {
			$(this).find('input').val("");
			if (_this.parent().find('form:visible').size() == 1) {
				var LastForm = _this.parent().find('form:visible');
				if ((LastForm.find('input[name="uploadForumPostAttachment"]').val() == "") &&
					(LastForm.find('input[name="title"]').val() == "")) {
					LastForm.find('.btnFile_Remove').fadeOut('fast');
				}
			}		
		});
		return false;
	}); // Close btnFile_Remove.click







});

