Ext.onReady(function(){
		var step = window.step || 0;
		var image_dir = "images/steps/wrap_ideas/";
		
		var images = new Array("img01.jpg", "img02.jpg", "img03.jpg", "img04.jpg", "img05.jpg", "img06.jpg");

		var alts = new Array( " ", " ", " ", " ", " ", " " );

		var descriptions = new Array("<p>Simple silver paper becomes fun and funky when you add hot pink and bright green stars for bows. An ornament tied to the bow becomes a second gift!</p>", 
									 "<p>A plastic beach pail can be transformed into a fun gift bag. Take some colored foam purchased from a local craft store and design cutouts to glue to the side. Hot-glue  fur trim around the rim of the pail. Then just drop in the gift and add some tissue paper to delight the children on your list.</p>",
									 "<p>Stacked gold boxes with the first letter of the recipient's name tied up with the bow instantly personalizes your package. The boxes can be used again as gift wrap or as decorative storage in the home.</p>",
									 "<p>This charming metal container is perfect for homemade treats. The recipient can set out and serve straight from the cute box! </p>",
									 "<p>As early Christmas gifts, I made ornaments for my friends out of copper cookie cutters. I embellished them by simply wiring on or hot-gluing beads and decorations.</p>", 
									 "<p>Create a unique package using natural brown paper paired with traditional Christmas colors. Homemade foil stars add a nice touch!</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();
	
});	