(function(){var LPP={

	Address:
	{
		create:function()
		{
			$.post('/address/create/',$('#frmAddress').serialize(),function(result){$('#conAddressCreate').html(result);},'html');
			return false;
		},
		append:function(address)
		{
			$('#jobShippingAdrsId').append('<option value="'+address.id+'" selected="selected">'+address.value+'</option>');
			$('#dlgAddressCreate').dialog('close');
		},
		sameasbilling:function(element)
		{
			$("[name^='shipping']").attr("disabled",(element.checked==true?"disabled":""));
		}
	},
	Account:
	{
		toggleDetailsForm:function()
		{
			$('#conAccountDetails').toggle();
			$('#conAccountForm').toggle();
		},
		_edit:function()
		{
			$.post('/account/edit/',$('#frmAccountEdit').serialize(),function(result){$('#conAccountForm').html(result)},'html');
		},
		details:function(){this.toggleDetailsForm(); $('#conAccountDetails').load('/account/details/');}
	},
	Billing:
	{
		toggleDetailsForm:function()
		{
			$('#conBillingDetails').toggle();
			$('#conBillingForm').toggle();
		},
		_edit:function()
		{
			$.post('/billing/edit/',$('#frmBillingEdit').serialize(),function(result){$('#conBillingForm').html(result)},'html');
		},
		details:function(){this.toggleDetailsForm(); $('#conBillingDetails').load('/billing/details/');}
	},
	Files:
	{
		_delete:function(fileId,jobId)
		{
			$.post('/files/delete/',{file:fileId,job:jobId},function(result){$('#conFilesList').html(result);},'html');
		}
	},
	Jobs:
	{
		jobId:0,
		dlt:function(jobId)
		{
			this.jobId=jobId;
			$('#dlgDelete').dialog('open');
		},
		_dlt:function()
		{
			$.post('/jobs/delete/job/'+this.jobId+'/',{},function(result){$('#dlgDelete').dialog('close'); $('#content.jobs #list').html(result);},'html');
		}
	}
}; window.LPP=LPP;})()