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

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


		var descriptions = new Array(	"<p>1. Combine all of the dry ingredients in a mixing bowl.</p>",
																	"<p>2. Add the egg and buttermilk. Also add in a half-cup of cheese or other ingredient if you want to change up the plain bread recipe. Sometimes I like to add a little corn or bell pepper chopped in the batter to give the muffins a little texture.</p>",
																	"<p>3. Thoroughly mix ingredients.</p>",
																	"<p>4. Pour the batter into a prepared pan.</p>",
																	"<p>5. Serve these warm muffins with some butter or jelly. (Some of my guests enjoy splitting them open and topping with syrup. Now, that's dessert for me!)</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();
	
});	