/*
 * A maxshop style in javascript scope.<br />
 * This jsonData object must contain
 * <ul>
 *		<li>itemId</li>
 *		<li>availability</li>
 * </ul>
 * This advancedData object may contrain
 * <ul>
 *		<li>itemPrice</li>
 * </ul>
 * @param {object} jsonData
 * @param {object} advancedData
 */
maxshop.item = function(jsonData, advancedData)
{
	var _id = jsonData.itemId
	var _date = new Date(jsonData.availability.date);
	var _description = jsonData.availability.description;
	var _status = jsonData.availability.status;
	var _colour = jsonData.colour;
	var _size = jsonData.size;
	var _price;

	if( advancedData )
	{
		if( advancedData.itemPrice )
		{
			_price = advancedData.itemPrice;
		}
	}

	/*
	 * Get the id.
	 * @return int
	 */
	this.getId = function()
	{
		return _id;
	}

	/*
	 * Get the availability status.
	 * @return string
	 */
	this.getAvailabilityStatus = function()
	{
		return _status;
	}

	/*
	 * Get the availability description.
	 * @return string
	 */
	this.getAvailabilityDescription = function()
	{
		return _description;
	}

	/*
	 * Get the availability date.
	 * @return date
	 */
	this.getAvailabilityDate = function()
	{
		return _date;
	}

	/*
	 * Get the item colour.
	 * @return the colour
	 * @type Object.
	 */
	this.getColour = function()
	{
		return _colour;
	}

	/*
	 * Get the item size.
	 * @return the size
	 * @type Object.
	 */
	this.getSize = function()
	{
		return _size;
	}


	/*
	 * Get the item Price.
	 * @return int
	 */
	this.getPrice = function()
	{
		return _price;
	}
}