var property = new Class({
	ID:		null,
	fDevelopmentID:		null,
	fTitle:		null,
	fPrice:		null,
	fPostcode:		null,
	fBedrooms:		null,
	fDescription:		null,
	fActive:		null,
	fAvailable:		null,
	fCompletion:		null,
	fFloorPlans:		null,
	fAttachments:		null,
	fDimensions:		null,
	fPropertyTypeID:		null,
	fMainImage:		null,

	//CONSTRUCTOR
	initialize:	function (ID, fDevelopmentID, fTitle, fPrice, fPostcode, fBedrooms, fDescription, fActive, fAvailable, fCompletion, fFloorPlans, fAttachments, fDimensions, fPropertyTypeID, fMainImage)
	{
		this.ID = ID;
		this.fDevelopmentID = fDevelopmentID;
		this.fTitle = fTitle;
		this.fPrice = fPrice;
		this.fPostcode = fPostcode;
		this.fBedrooms = fBedrooms;
		this.fDescription = fDescription;
		this.fActive = fActive;
		this.fAvailable = fAvailable;
		this.fCompletion = fCompletion;
		this.fFloorPlans = fFloorPlans;
		this.fAttachments = fAttachments;
		this.fDimensions = fDimensions;
		this.fPropertyTypeID = fPropertyTypeID;
		this.fMainImage = fMainImage;
	},

	//SETTERS
	setID:	function(ID)
	{
		this.ID = ID;
	},

	setDevelopmentID:	function(fDevelopmentID)
	{
		this.fDevelopmentID = fDevelopmentID;
	},

	setTitle:	function(fTitle)
	{
		this.fTitle = fTitle;
	},

	setPrice:	function(fPrice)
	{
		this.fPrice = fPrice;
	},

	setPostcode:	function(fPostcode)
	{
		this.fPostcode = fPostcode;
	},

	setBedrooms:	function(fBedrooms)
	{
		this.fBedrooms = fBedrooms;
	},

	setDescription:	function(fDescription)
	{
		this.fDescription = fDescription;
	},

	setActive:	function(fActive)
	{
		this.fActive = fActive;
	},

	setAvailable:	function(fAvailable)
	{
		this.fAvailable = fAvailable;
	},

	setCompletion:	function(fCompletion)
	{
		this.fCompletion = fCompletion;
	},

	setFloorPlans:	function(fFloorPlans)
	{
		this.fFloorPlans = fFloorPlans;
	},

	setAttachments:	function(fAttachments)
	{
		this.fAttachments = fAttachments;
	},

	setDimensions:	function(fDimensions)
	{
		this.fDimensions = fDimensions;
	},

	setPropertyTypeID:	function(fPropertyTypeID)
	{
		this.fPropertyTypeID = fPropertyTypeID;
	},

	setMainImage:	function(fMainImage)
	{
		this.fMainImage = fMainImage;
	},


	//GETTERS
	getID:	function()
	{
		return this.ID;
	},

	getDevelopmentID:	function()
	{
		return this.fDevelopmentID;
	},

	getTitle:	function()
	{
		return this.fTitle;
	},

	getPrice:	function()
	{
		return this.fPrice;
	},
	
	getPriceFormatted:	function()
	{
		return this.formatPrice(this.fPrice);
	},	

	getPostcode:	function()
	{
		return this.fPostcode;
	},

	getBedrooms:	function()
	{
		return this.fBedrooms;
	},

	getDescription:	function()
	{
		return this.fDescription;
	},

	getActive:	function()
	{
		return this.fActive;
	},

	getAvailable:	function()
	{
		return this.fAvailable;
	},

	getCompletion:	function()
	{
		return this.fCompletion;
	},

	getFloorPlans:	function()
	{
		return this.fFloorPlans;
	},

	getAttachments:	function()
	{
		return this.fAttachments;
	},

	getDimensions:	function()
	{
		return this.fDimensions;
	},

	getPropertyTypeID:	function()
	{
		return this.fPropertyTypeID;
	},

	getMainImage:	function()
	{
		return this.fMainImage;
	},
	
	formatPrice:	function(strToFormat)
	{
		var strToReturn = strToFormat.toString();
		var iLength 	= strToReturn.length;
		
		if(iLength > 3)
		{
			var iCommas = Math.floor((iLength - 1) / 3);
			var strTemp = strToReturn;
			
			for(var i = 1; i <= iCommas; i++)
			{
				var iCommaPos = (iLength - (i * 3));
				strTemp = strTemp.substring(0, iCommaPos) + "," + strTemp.substring(iCommaPos);
			}

			strToReturn = strTemp;
		}
		
		return "£" + strToReturn;
	}
});
