function our_coffee_nav(image_ref,header_ref,text_ref,stamps,stamp_fade,purchase_ref,image_path,landing_page_id,purchase_id,paging_controls_id,header_text_id)
{
	this.image_ref = image_ref;
	this.header_ref = header_ref;
	this.text_ref = text_ref;
	this.purchase_ref = purchase_ref;

	this.header_text_id = header_text_id;

	this.image_path = image_path;

	this.stamps = stamps;
	this.stamp_fade = stamp_fade;

	this.landing_page_id = landing_page_id;
	this.purchase_id = purchase_id;
	this.paging_controls_id = paging_controls_id;

	this.currentStamp = '';

	this.firstLoad = true;

	CN = this;

	this.clearAll = function()
	{
		stamps = $(CN.stamps);
		imgs = stamps.getElementsByTagName('img');	
		//set each image to fade
		for(i=0;imgs.length>i;i++)
		{
			imgs[i].className = CN.stamp_fade;
		}

		texts = $(CN.text_ref);
		divs = texts.getElementsByTagName('div');
		//hide each text content
		for(i=0;divs.length>i;i++)
		{
			divs[i].style.display = 'none';
		}

	}

	this.set_stamp = function(obj,arrayTarget)
	{
		CN.firstLoad = false;

		//clear all the sets
		CN.clearAll();

		//clear landing page
		$(CN.landing_page_id).style.display = 'none';
		$(CN.paging_controls_id).style.display = 'none';

		//show the purchase and bag
		$(CN.purchase_id).style.display = 'block';
		$(CN.image_ref).style.display = 'block';

		//set the current stamp
		CN.currentStamp = arrayTarget;

		//make this stamp not faded
		obj.className = '';
		//set this stamps text content as displayed
		$(aStamps[arrayTarget].target_text).style.display = 'block';
		//update the header text
		$(CN.header_ref).innerHTML = aStamps[arrayTarget].header_text;
		//update the bag image
		$(CN.image_ref).src = CN.image_path + aStamps[arrayTarget].image_src;
		//update the purchase link
		$(CN.purchase_ref).href = aStamps[arrayTarget].purchase_link;
		//update the header_text_id
		if( $(CN.header_text_id) )
		{
			$(CN.header_text_id).innerHTML = aStamps[arrayTarget].header_text_id_text;
		}
	}

	this.over = function(obj,stamp)
	{
		if( CN.not_current(stamp) && !CN.firstLoad )
		{
			obj.className = '';
		}
	}

	this.out = function(obj,stamp)
	{
		if( CN.not_current(stamp) && !CN.firstLoad )
		{			
			obj.className = CN.stamp_fade;
		}
	}

	this.not_current = function(stamp)
	{
		if( CN.currentStamp != stamp )
		{
			return true;
		}
		else
		{
			return false;
		}
	}

}

function stamp_data(target_text,header_text,image_src,purchase_link,header_text_id_text)
{
	this.target_text = target_text;
	this.header_text = header_text;
	this.image_src = image_src;
	this.purchase_link = purchase_link;
	this.header_text_id_text = header_text_id_text;
}