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

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

		var descriptions = new Array("<p><b>Have Your Coffee &amp; Breakfast, Too</b><br/>The Cooks 3-in-1 Breakfast Center is perfect for a small kitchen, dorm room, or traveling. It features a 4-cup coffeemaker with permanent filter, an 8x10 1/2-inch griddle, and a 4-slice toaster oven. $39.99; <a target='_blank' href='http://www.jcpenney.com'>jcpenney.com</a> or 800-322-1189.</p>", 
									 "<p><b>Fun Flipping</b><br />Both ends of these Chef'n ZipFlip Slotted Large and Medium Turners are heat resistant. Flip pancakes, crepes, omelets, or meats. $9.95-$10; <a target='_blank' href='http://www.chefn.com'>chefn.com</a> or 866-642-4336.</p>",
									 "<p><b>Made in America</b><br />Fiesta dinnerware Covered Casseroles in Scarlet and Cobalt are microwave and dishwasher safe, ovenproof, freezer friendly, and lead-free. $49.99 each; <a target='_blank' href='http://www.homerlaughlin.com '>homerlaughlin.com </a> or 800-452-4462.</p>",
									 "<p><b>Not Just for Pizza</b><br/>Zyliss Pizza Slicer with Crust Cutter has an innovative &quot;crust cutter&quot; that easily reaches corners to slice thick, crispy pizza crust. Use it to cut lasagna and other baked goods, too. $14.99; <a target='_blank' href='http://www.zylissusa.com'>zylissusa.com</a> or 888-794-7623.</p>",
									 "<p><b>What a Pare</b><br />Zyliss Paring Knife and Serrated Paring Knife come in bright fun colors and have a unique soft-touch handle designed to provide a secure grip. $7.99; <a target='_blank' href='http://www.zylissusa.com '>zylissusa.com </a> or 888-794-7623.</p>", 
									 "<p><b>Multi-Purpose Roasting Pan</b><br />This KitchenAid Covered Dome Roaster was designed as a roaster and can accommodate a full-sized turkey, but it can also be used to bake many types of casseroles. $69.99; <a target='_blank' href='http://kitchenaidcookware.com'>kitchenaidcookware.com</a> or 888-801-1707.</p>", 
									"<p><b>Get a Step Ahead</b><br />The drain holes in these 3-cup Chef's Planet Measuring Colanders double as measuring lines for one-step draining and measuring. $15 each; <a target='_blank' href='http://www.chefsplanet.com'>chefsplanet.com</a> or 877-703-8889.</p>",
									"<p><b>Catch of the Day</b><br />Serve your favorite recipe in this adorable imported ceramic Crab Bowl. It's microwave and dishwasher safe. $66.50; <a target='_blank' href='http://www.cotoncolorspottery.com '>cotoncolorspottery.com </a> or 850-383-1111.</p>",
									"<p><b>Art &amp; Performance</b><br />Add a touch of art deco style to your kitchen with this 2-Slice Cool-Touch toaster that features extra-wide slots, six settings, and four functions so you can toast, reheat, and defrost with style. $34.99; <a target='_blank' href='http://www.aroma-housewares.com'>aroma-housewares.com</a> or 800-276-6286.</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();
	
});	