Ext.onReady(function(){
		var step = window.step || 0;
		var image_dir = "images/slideshows/tastemakers/charleston/";
		
		var images = new Array("PeninsulaGrill033JOH.jpg", "GullahCuisine006.jpg", "GlassOnion017.jpg", "Carolinas006JOH.jpg", "WildFlours028.jpg", "McCradys019JOH.jpg", "Wreck002.jpg", "Magnolias002JOH.jpg", "Fig004.jpg", "HominyGrill007JOH.jpg", "TrattLucca003JOH.jpg", "SNOB042.jpg");

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


		var descriptions = new Array(	"<p>Peninsula Grill<br/>Elegance and decadence abound in the plush 100-seat dining room of the Peninsula Grill, located in the Planters Inn on Market Street. Chef Robert Carter\'s Coconut Cake, based on his mother\'s recipe, is world famous, the subject of a <em>Throwdown with Bobby Flay</em>.<br/> <a href='http://www.peninsulagrill.com' target='_blank'>www.peninsulagrill.com</a></p>",
										"<p>Gullah Cuisine<br/>Charlotte Jenkins\' lunch buffet at Gullah Cuisine is one of the most extensive and authentic in the area, with a full range of nourishing Southern veggies such as stewed greens, succotash, and okra soup, dishes that epitomize the traditional cuisine of the Sea Islands.<br/><a href='http://www.gullahcuisine.com' target='_blank'>www.gullahcuisine.com</a></p>",
										"<p>The Glass Onion<br/>The menu at the Glass Onion is full-on Southern, with an emphasis on the cooking of the Lowcountry and that of New Orleans, and lines of locals stretch out the door at lunch and dinner. \"We feel like it\'s the food we grew up eating, with some fine-dining influences thrown in,\" says Sarah O\'Kelley, one of the restaurant\'s three partners. <br/><a href='http://www.ilovetheglassonion.com' target='_blank'>www.ilovetheglassonion.com</a></p>",
										"<p>Carolina\'s<br/>Jeremiah Bacon, the talented new chef at Carolina\'s, prepares sophisticated Asian-influenced takes on Lowcountry cooking, as in his Shrimp and Crab  Wontons with Red Pepper Coulis and Pan Seared Grouper with Mashed Potatoes and Bok Choy. <br/><a href='www.carolinasrestaurant.com' target='_blank'>www.carolinasrestaurant.com</a></p>",
										"<p>Wild Flour Pastry<br/>Lauren Mitterer, who earned a James Beard Award nomination as the pastry chef at Red Drum Gastropub, has opened her own bakery, Wild Flour Pastry, a shoe-box-size, homey caf&eacute; in downtown Charleston. Fans of her sweets can sample simple pleasures such as her Chocolate Chip Cookies as well as  more elaborate cupcakes like the Vanilla Cupcake with Meyer Lemon Curd, Coconut Buttercream, and Toasted Coconut.<br/><a href='http://www.wildflourpastrycharleston.com' target='_blank'>www.wildflourpastrycharleston.com</a></p>",
										"<p>McCrady\'s<br/>McCrady\'s has been a mainstay of Charleston fine dining for decades, but its kitchen is as cutting edge as you\'ll find in the Holy City. James Beard Award\-nominated chef Sean Brock is devoted to homegrown ingredients, which he transforms into delicacies both classic and nouvelle.<br/><a href='http://www.mccradysrestaurant.com' target='_blank'>www.mccradysrestaurant.com</a></p>",
										"<p>The Wreck of the Richard & Charlene<br/>When the Lee Brothers want to dig into sparklingly fresh seafood, served without fuss, they head to the Wreck of the Richard & Charlene, a fish shack known to locals simply as The Wreck. It offers Lowcountry specialties like She-Crab Soup and Deviled Crab, but the No. 7 fried seafood platter (fried whiting, fried oysters, fried shrimp, fried scallops, a hushpuppy, fried bacon-laced grits, red rice, and sieva beans) is the brothers\' favorite. <br/><a href='http://www.wreckrc.com' target='_blank'>www.wreckrc.com</a></p>",
										"<p>Magnolias<br/>\"The Donalds,\" Culinary Institute of America-trained chefs Donald Barickman and Donald Drake, command the kitchens of Magnolias, a classic Charleston restaurant, which specializes in upscale Southern essentials like pimiento cheese, a killer Bloody Mary, and blackened catfish over dirty rice.<br/><a href='http://www.magnolias-blossom-cypress.com' target='_blank'>www.magnolias-blossom-cypress.com</a></p>",
										"<p>Fig<br/>At Fig, the simple name of this relaxed neighborhood eatery, James Beard Award\-winning Chef Mike Lata taps his relationships with local farmers and fishermen to create French\-influenced Lowcountry dishes that comfort and impress.<br/><a href='http://www.eatatfig.com' target='_blank'>www.eatatfig.com</a></p>",
										"<p>Hominy Grill<br/>At Hominy Grill, Robert Stehling shows us just how delicious and innovative Southern food can be with dishes like Creamed Collards and Saffron Rice Omelette with She-Crab Gravy. His contemporary spins on traditional Southern fare show the region\'s cuisine to be a vibrant, living&mdash;and delectable&mdash;art.<br/><a href='http://www.hominygrill.com' target='_blank'>www.hominygrill.com</a></p>",
										"<p>Trattoria Lucca<br/>Trattoria Lucca, Ken Vedrinski\'s Italian restaurant, lights up Bogard Street like a lantern, and inside is always rollicking and boisterous. But the food, which incorporates local ingredients like shrimp and crab, butterbeans, and field peas, is as refined as any you\'re likely to find in the state, Italian or otherwise.<br/><a href='http://www.luccacharleston.com' target='_blank'>www.luccacharleston.com</a></p>",
										"<p>Slightly North of Broad<br/>Slightly North of Broad (called SNOB by locals!) is a reflection of executive chef Frank Lee\'s personal style&mdash;affable and welcoming. The dean of Charleston\'s restaurant scene, Chef Lee (no relation to the Lee Brothers) has been a mentor to many young chefs who have made their names in kitchens around the world. His menu highlights locally sourced ingredients and Lowcountry classics like Oyster Stew and Carolina Quail, as well as dishes that reflect Mediterranean, Mexican, and Asian influences. <br/><a href='http://www.mavericksouthernkitchens.com/snob' target='_blank'>www.mavericksouthernkitchens.com/snob</a></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();
});	