Ext.onReady(function(){
		var step = window.step || 0;
		var image_dir = "images/steps/fried_chicken/";
		
		var images = new Array("one.jpg", "two.jpg", "three.jpg", "four.jpg", "five.jpg", "six.jpg");

		var alts = new Array("one", "two", "three", "four", "five", "six");


		var descriptions = new Array(	"<p>1. Wash and prepare chicken. </p>",
																	"<p>2. Beat eggs with water in a medium bowl. Add enough hot sauce to make the mixture bright orange.</p>",
																	"<p>3. Season chicken with <a href='recipe_results.php?id=1250'>The Lady's House Seasoning</a>.</p>",
																	"<p>4. After dipping the chicken in the egg mixture, dredge in the flour mixture, coating well. </p>",
																	"<p>5. Carefully place chicken in the hot oil. Fry in batches. </p>",
																	"<p>6. Chicken is ready when it is brown and crispy.</p>"
																	);	
			

	var vimg = Ext.getDom('viewer_img');
	var vtext = Ext.getDom('viewer_text');
	
	Ext.get('next').on('click', function(){
		Ext.get('ss_left').show();
		step = step + 1;
		if(step>images.length-1){
			step=0;
		}
		vimg.alt = alts[step];
		vimg.src = image_dir + images[step];
		vtext.innerHTML = descriptions[step];
		if(step==images.length-1){
			Ext.get('ss_right').hide();
		}
	});
	
	Ext.get('prev').on('click', function(){
		Ext.get('ss_right').show();
		step = step - 1;
		if(step<0){
			step=images.length-1;
		}
		vimg.alt = alts[step];
		vimg.src = image_dir + images[step];
		vtext.innerHTML = descriptions[step];
		if(step==0){
			Ext.get('ss_left').hide();
		}
																			 
	});
	
	
	//load intial photo and text
	vimg.alt = alts[step];
	vimg.src = image_dir + images[step];
	vtext.innerHTML = descriptions[step];
	
	//hide previous button initially
	Ext.get('ss_left').hide();
	
});	