/* (c) Brightlemon Ltd 2009 */

var Recipe = Class.create({
		
		initialize: function(title, url, ing, instr, cookTime, type)
		{
			if((!title) || (!url) || (!ing) || (!instr) || (title.length < 2) || (url.length < 4) || (ing.length == 0) || (instr.length == 0))
			{
				alert("Insufficient parameters provided for recipe");
				return false;
			}
			
			this.title = title;
			this.url = url;
			this.ing = ing;
			this.instr = instr;
			this.cookTime = cookTime;
			
			if(type == "rice")
				this.type = 1;
			else
				this.type = 2;
			
		},
		
		generateHTML: function()
		{
			
			this.outerDiv = new Element('div');
			this.outerDiv.addClassName('ecard_item').observe('click', this._clickHandle.bindAsEventListener(this));
			
			var img = new Element('img', {'src' : SKIN_URL + 'images/recipes/' + this.url + '.gif'});
			var title = new Element('a', {'href' : '#'}).setStyle({'display' : 'block'}).update(this.title);
			
			Element.insert(this.outerDiv, img);
			Element.insert(this.outerDiv, title);
			
			if(this.type == 1) //rice
				Element.insert('rice', this.outerDiv);
			else
				Element.insert('noodles', this.outerDiv);
		},
		
		_clickHandle: function(event)
		{
			$$('#recipe_popup img')[0].src = SKIN_URL + 'images/recipes/' + this.url + '.gif';
			$('title').innerHTML = this.title;
			
			$$('#recipe_popup .left_col h5 span')[0].update(this.cookTime);
			
			var ingList = $$('#recipe_popup .left_col ul')[0];
			
			// remove all current list items
			ingList.childElements().each(function(a){a.remove();});
			
			for(var i = 0, l = this.ing.length; i < l; i++)
			{
				var li = new Element("li");
				Element.insert(ingList, li.update(this.ing[i]));
				
			}
			
			var instrList = $$('#recipe_popup .right_col ol')[0];
			
			// remove all current list items
			instrList.childElements().each(function(a){a.remove();});
			
			for(var i = 0, l = this.instr.length; i < l; i++)
			{
				var li = new Element("li");
				Element.insert(instrList, li.update(this.instr[i]));
				
			}
			
			
			$('gray_bg').style.height = $$('body')[0].getHeight();
			$('gray_bg').style.width = $$('body')[0].getWidth();
			
			Effect.Appear('gray_bg', {duration: 0.5, to: 0.5});
			Effect.Appear('recipe_popup', {duration: 0.5});

		
			
		}
});

var recipes = [];
recipes.push(	new Recipe('Chinese Cashew Fried Rice', 'rice9', /* ingredients */
								[   "1  container soft (silken) tofu, mashed",
								    "1/8 tsp turmeric",
								    "1 tsp onion powder",
								    "1/2 tsp salt",
								    "3 tbsp vegetable oil",
								    "5 cups pre-cooked rice",
								    "1/2 cups cashew nuts, chopped",
								    "3 tbsp soy sauce",
								    "1 tsp sugar",
								    "6 green onions, chopped"],
								    /* instructions */
								    [	"Mix the tofu, turmeric, onion powder and salt in a bowl and set aside.",
								    	"In a medium skilled over medium heat, heat one tablespoon of the oil. Add the tofu mixture and cook, stirring constantly for 10 minutes. Remove the tofu from the heat and set aside.",
									"Combine the soy sauce, sugar and green onions in a small bowl. Stir to dissolve the sugar and set aside.",
									"Place a dry wok or large skillet over medium-high heat. When the wok begins to smoke, add the remaining oil, then the onions and rice.",
									"Stir-fry for 3 minutes. Pour in the soy sauce mixture and stir-fry until rice is heated through, about 5 minutes.",
									"Stir in the cashews and the tofu and serve hot."], 
								
								'5 minutes', 'rice'),
	
	
	
		new Recipe('Korean Kimchi Fried Rice', 'rice10', /* ingredients */
							     [ 	"2  eggs (optional)",
								"1/4 lb pork loin",
								"1 tbsp soy sauce",
								"1 tsp sugar",
								"3 tbsp corn oil",
								"1 1/2 cups packed pickled napa cabbage, cut into small pieces, squeezed",
								"3 cups cooked rice",
								"2 green onions, chopped",
								"1 tbsp sesame seeds (optional)",
								"1 slab fish cake, defrosted and cut into 2in strips (optional)"],
								    /* instructions */
								    [	"Heat wok/stir-fry pan.",
								    	"Whisk the 2 eggs with a little bit of oil and add to wok; working with a wooden spatula, separate into small pieces; remove from wok and set aside.",
									"Cut pork into small thin strips; season with soy sauce and sugar; add a little oil to the wok and stir-fry pork until cooked through; remove from wok and set aside.",
									"Heat 3-4 Tbsp corn oil in the wok and add kimchi; fry until translucent.",
									"Stir in rice and mix well.",
									"Lower heat and fold in eggs, pork, green onions, sesame seeds and fish cake strips.",
									"Season with salt and red pepper to taste."], 
								'5 minutes', 'rice'),
		
		
		
		new Recipe('Japanese Chicken Katsu Curry with Rice', 'rice4', /* ingredients */
							     [ 	"2 tbsp butter",
							     	"2 clv garlic, chopped",
								"1 small onion, chopped",
								"3 granny smith apple peeled, cored and diced",
								"500 ml boiling water",
								"2 bananas, sliced",
								"2 tbsp honey",
								"1 tbsp turmeric",
								"1/2 tsp hot madras curry powder",
								"2 tbsp tomato ketchup",
								"450 ml chicken stock",
								"1 tbsp ground black pepper, or to taste",
								"1 tbsp salt",
								"2 tsp cornflour",
								"4 chicken breasts",
								"200 g plain flour",
								"4 eggs, beaten",
								"300 g breadcrumbs, ideally panko breadcrumbs",
								"500 ml groundnut oil" ],
								    /* instructions */
								    [	"First make the sauce. Heat a large pan over high heat and melt the butter. Saute the garlic and onions then add the apples, the boiling water, bananas, honey, turmeric, Madras powder and ketchup Bring the sauce to the boil and add the chicken stock, water, blended cornflour, salt and pepper. Cook for 20 minutes, stirring occasionally",
								    	"Strain the sauce through a sieve into a bowl, discarding any solids. Cover with foil and keep warm in the oven (you can reheat in a small pan to make sure it is piping hot before serving)",
									"Make some slits in the chicken breasts to endure that the heat will get through. Coat the breasts in plain flour and shake off any excess Dip the breasts in to the beaten egg, then coat evenly with the breadcrumbs.",
									"Heat a wok over a high heat and add the ground nut oil. Deep fry the chicken breasts for 5-6 minutes (depending on size) until golden brown. You may need to work in batches; keep them warm on a plate covered with foil in the oven until all the pieces are cooked",
									"Serve the chicken with the curry sauce, steamed rice or udon noodles or heat some butter and garlic in a pan, add some cooked potatoes and carrots and add the sauce together and heat through."], 
								'20 minutes', 'rice'),
		
		
		
		
		new Recipe('California Roll Recipe - Japanese Recipe', 'rice5', /* ingredients */
							     [ 	"4 cups sushi rice",
							     	"4 sheets of nori (dried seaweed)",
								"1 avocado",
								"3/4 cups crab meat",
								"2 tbsp mayonnaise",
								"1/2 tsp salt"],
								    /* instructions */
								    [	"Peel an avocado and cut it into strips or mash it.",
								    	"Put crab in a bowl and mix with salt and mayonnaise.",
									"Cover a bamboo mat with plastic wrap. Put a sheet of dried seaweed on top of the mat. Spread sushi rice on top of the seaweed and press firmly.",
									"Sprinkle sesame seeds over the sushi rice. Turn the sushi layer over so that the seaweed is on top.",
									"Place avocado and crab lengthwise on the seaweed.",
									"Roll the bamboo mat forward, pressing the ingredients inside the cylinder-shaped sushi. Press firmly the bamboo mat with hands, and then remove the rolled sushi.",
									"Cut the sushi roll into bite-size pieces."], 
								'10 minutes', 'rice'),
		
		
		
		new Recipe('Thai Green Chicken Curry', 'rice3', /* ingredients */
							     [ 	"1 tbsp vegetable oil",
							     	"2 banana shallots, finely sliced",
								"2 tbsp thai green curry paste",
								"400 ml coconut milk",
								"1 tbsp fish sauce",
								"4 chicken thighs, boneless and skinless",
								"250 g new potatoes, peeled and halved",
								"125 g pea aubergines",
								"1 lime, juice only",
								"salt and freshly ground pepper",
								"250 g thai jasmine rice",
								"1 lemongrass stalk, lightly crushed (for the rice)",
								"500 ml water"],
								    /* instructions */
								    [	"For the curry, heat a large deep-lidded frying pan or wok until hot, then add the vegetable oil and the shallots. Stir-fry for one minute, then add the curry paste and stir-fry for a further minute.",
								    	"Add the coconut milk and bring to the boil.",
									"Add the fish sauce, chicken thighs, potatoes and aubergines and return to a simmer. Cover with a lid and simmer gently for 15-20 minutes, or until the chicken is completely cooked through and the potatoes are tender. Add the limejuice, season to taste with salt and freshly ground black pepper and stir.",
									"Meanwhile, for the rice, place the rice and lemongrass into a small saucepan and cover with the cold water. Cover with a lid and bring to the boil. Reduce the heat and simmer for 12-15 minutes, or until the rice is tender and all the water has been absorbed. Remove the lemongrass.",
									"To serve, place the rice onto serving plates, top with the curry and sprinkle over the coriander."], 
								'10 minutes', 'rice'),
		
		
		
		new Recipe('Hainanese Chicken Rice', 'rice6', /* ingredients */
							     [ 	"2 lb chicken",
							     	"1 scallion, cut into 1in pieces",
								"4 slices fresh, peeled ginger",
								"6 tbsp vegetable oil",
								"7 garlic cloves",
								"4 cups long-grain uncooked rice, washed and drained",
								"1 tsp fine salt",
								"3 tbsp lemon or lime juice, freshly squeezed (for chili sauce)",
								"5 tbsp fresh red chillies, finely chopped (for chili sauce)",
								"5 clove garlic, chopped (for chili sauce)",
								"3 tbsp ginger, finely chopped (for chili sauce)",
								"1 tbsp fine salt (for chili sauce)",
								"1/2 cup boiling hot chicken soup (for chili sauce)"],
								
								    /* instructions */
								    [	"Boil a large pot of water.",
								    	"Stuff the cavity of the chicken with scallion and ginger.",
									"Add chicken to boiling water, breast side-down. Lower the heat to a simmer just under boiling point and cook, covered until just cooked through, about 40 minutes.",
									"Bathe the chicken in an ice water bath till chicken is cold to create a tender, springy texture.",
									"Heat oil in a rice cooker, add garlic, stir-fry till fragrant. Add uncooked rice, stir-fry for two minutes, add salt and enough chicken soup to cover 1/2 inch above the top of the rice. Boil on high heat, lower heat when steam holes form, cover and steam for 30 minutes till rice is cooked.",
									"Chop chicken and serve with steaming hot rice and chilli sauce. Dark soya sauce is the ideal accompaniment."], 
								'5 minutes', 'rice'),
		
		
		new Recipe('Lamb curry with basmati rice', 'rice7', /* ingredients */
							     [	"2 tbsp vegetable oil",
							     	"900 g lamb fillet, cut into 3cm/1in cubes",
								"2 onions",
								"3 clove garlic",
								"2 green chillies, finely chopped",
								"1 tbsp fresh ginger, grated",
								"1 tbsp ground turmeric",
								"1 1/2 tbsp garam masala",
								"1 1/2 tbsp ground cumin",
								"1 tbsp chilli powder",
								"1 tbsp plain flour",
								"6 large tomatoes",
								"400 ml coconut milk",
								"600 ml chicken stock",
								"250 g baby spinach leaves",
								"1 pomegranate, seeded",
								"200 g plain yoghurt",
								"salt",
								"freshly ground pepper",
								"steamed basmati rice, to serve"],
								
								    /* instructions */
								    [	"Heat a large saucepan and add one tablespoon of the vegetable oil and then the lamb. Cook over a high heat for 3-4 minutes, or until the lamb is golden-brown all over, then remove and set aside.",
								    	"Reduce the heat and add the remaining tablespoon of vegetable oil. Add the onions, garlic, chillies and ginger and fry for 2-3 minutes, until golden and softened. ",
									"Add all the turmeric, garam masala, cumin and chilli powder and fry, stirring well, for one minute.",
									"Add the flour and cook for a further minute.",
									"Add the tomatoes and coconut milk and heat to bring to a simmer.",
									"Add the lamb and enough chicken stock to just cover the lamb. Stir well, scraping the bottom of the pan to deglaze and release any residue at the bottom of the pan.",
									"Heat the mixture until simmering, and then cover and cook on a low heat for about one hour, or until the lamb is tender and cooked through.",
									"Skim off any excess fat from the surface of the sauce, and then add the spinach and pomegranate. Cook for 1-2 minutes, until the spinach has wilted.",
									"Add the yoghurt, season, to taste, with salt and freshly ground black pepper and stir well.",
									"Serve onto warmed plates with steamed basmati rice alongside."], 
								'20 minutes', 'rice'),
		
		
		
		new Recipe('Rice pudding', 'rice8', /* ingredients */
							     [	"55 g pudding rice",
							     	"55 g sugar",
								"1 pt full fat milk",
								"grated nutmeg",
								"small amount of butter"],
								
								    /* instructions */
								    [	"Mix rice and sugar in a baking dish and pour on milk.",
								    	"Grate nutmeg on the top and dot with three or four bits of butter.",
									"Bake in the oven for 1 hour at 160-180C/325-350F/Gas3-4.",
									"Serve it up!"], 
								'5 minutes', 'rice'),
		
		
		
		
		new Recipe('Egg fried rice', 'rice2', /* ingredients */
							     [	"2 tbsp groundnut oil",
							     	"3 free-range eggs",
								"3 tbsp light soy sauce",
								"1 dash toasted sesame oil",
								"1 pinch ground white pepper",
								"1 large spring onion",
								"400 g jasmine rice, cooked according to packet instructions",
								"3 tomatoes, sliced"],
								
								    /* instructions */
								    [	"Heat a wok until smoking and add half the groundnut oil, and then add the eggs and scramble for 1-2 minutes. Transfer the scrambled eggs to a warm plate and set aside. Wipe away the excess oil from the wok.",
								    	"Reheat the wok and add the remaining groundnut oil. Add the cooked rice and stir well to break up the grains, then add the tomatoes and stir-fry for 1-2 minutes.",
									"Return the egg to the wok with the rice and tomatoes and season, to taste, with the soy sauce, sesame oil and white pepper. Stir in the sliced spring onion.",
									"Pile the rice onto a plate and serve immediately."], 
								'10 minutes', 'rice'),
		
		
		
		new Recipe('Rice and peas', 'rice1', /* ingredients */
							     [	"250 g black-eyed beans, soaked sprig of thyme",
							     	"salt",
								"1 1/4 pt boiled water",
								"250 g desiccated coconut",
								"500 g american long-grain or easy-cook rice"],
								
								    /* instructions */
								    [	"Put the beans and thyme into a saucepan of lightly salted water and boil vigorously for about 45 minutes, until the peas are soft.",
								    	"Allow the boiled kettle water to cool a little then pour over the desiccated coconut in a bowl to make coconut water.",
									"Put the desiccated coconut and boiled water into a blender or food processor and blend, then strain. Discard the coconut.",
									"Add the rice and coconut water to the soft peas in the saucepan.",
									"Put a lid on the saucepan, turn the heat down very low and leave the rice to cook. It will take approximately 40 minutes."], 
								'5 minutes', 'rice'),
		
		/* ------------------------------------ NOODLES ------------------------------------------------------------------------- */
		
		new Recipe('Sausage Noodle Casserole', 'noodle5', /* ingredients */
							     [	"1/2 cup onion, chopped",
							     	"1 lb bulk sausage",
								"1/4 cup green pepper, chopped",
								"1 can cream of chicken soup, undiluted",
								"8 oz egg noodles, cooked and drained",
								"salt and pepper to taste",
								"1/2 cup french onion rings, crumbled"],
								
								    /* instructions */
								    [	"Crumble sausage in a large skillet; add chopped onion and green pepper.",
								    	"Cook over medium heat until meat is browned and vegetables are tender.",
									"Drain off grease. In a large bowl combine meat mixture with soup, water, cooked noodles and salt and pepper.",
									"Spoon mixture into a greased 2-quart baking dish.",
									"Sprinkle with crumbled onion rings; bake at 350 degrees for about 30 minutes or until bubbly."], 
								'10 minutes', 'noodle'),
		
		
		
		
		
		
		new Recipe('Pad Thai', 'noodle9', /* ingredients */
							     [	"1 tbsp olive oil",
							     	"85 g medium egg noodles, cooked",
								"1 pinch chilli flakes",
								"1 tsp soy sauce",
								"salt and freshly ground pepper",
								"1/4 stack lemongrass, bruised",
								"55 g mange tout, cut into small diamond shapes",
								"2 eggs",
								"1 splash of water",
								"1 lime, quartered, to serve"],
								
								    /* instructions */
								    [	"Heat a non-stick wok or large frying pan until hot.",
								    	"Add the oil and then cook the noodles for 1-2 minutes, stirring frequently.",
									"Stir in the chilli flakes, soy sauce, seasoning and lemongrass and stir-fry for a further few minutes.",
									"Add the mangetout and heat for 1-2 minutes.",
									"Meanwhile, beat the eggs, seasoning and water in a bowl.",
									"Heat the oil in a large frying pan and pour in the egg mixture. Move the mixture slowly, scraping up flakes of egg mixture as you do this. Tilt the pan to help the liquid run to the sides of the pan and then leave over the heat until the bottom has set and the top is creamy.",
									"Remove from the heat and transfer the omelette to a serving plate. Spoon the pad Thai inside. Fold the omelette over and serve the lime wedges alongside."], 
								'15 minutes', 'noodle'),
		
		
		
		
		new Recipe('Clear beef noodle soup', 'noodle10', /* ingredients */
							[	"<b>Source: Lesley Waters</b>",
							     	"250 ml beef stock",
							     	"1 clove garlic, peeled and crushed",
								"1/2 beef sirloin steak, diced",
								"1 pinch chilli flakes",
								"1 tbsp sesame oil",
								"55 g noodles"],
								
								    /* instructions */
								    [	"Bring the beef stock to the boil in a medium saucepan.",
								    	"Add the garlic, beef, chilli flakes and fennel and reduce the heat. Cook for 6-8 minutes or until the beef is cooked, stirring occasionally.",
									"Stir in the sesame oil and then add the noodles/pasta and heat for a few more minutes.",
									"Remove from the heat and then transfer the soup to a serving bowl to serve."], 
								'20 minutes', 'noodle'),
		
		
		
		
		
		new Recipe('Chow mein', 'noodle7', /* ingredients */
							[     	"225 g egg noodles",
								"2 tbsp garlic, finely chopped",
								"50 g mange tout, trimmed",
								"50 g parma ham or cooked ham, finely shredded",
								"2 tsp light soy sauce",
								"2 tsp dark soy sauce",
								"1 tbsp shaoxing rice wine or dry sherry",
								"1/2 tsp salt",
								"1/2 tsp freshly ground white pepper",
								"1/2 tsp sugar",
								"3 tbsp spring onions, finely chopped",
								"2 tsp sesame oil",
								"2 tsp light soy sauce (for the marinade)",
								"2 tsp shaoxing rice wine or dry sherry (for the marinade)",
								"1 tsp sesame oil (for the marinade)",
								"1/2 tsp salt (for the marinade)",
								"1/2 tsp freshly ground pepper (for the marinade)"],
								
								    /* instructions */
								    [	"Cook the noodles by boiling them for 3-5 minutes in a pan of boiling water. Drain and plunge into cold water, drain again then toss with a little sesame oil.",
								    	"Using a cleaver, slice the chicken breasts into fine shreds approximately 5cm (2 in) long.",
									"To marinate the chicken, combine the chicken with the light soy sauce, rice wine, sesame oil, salt and pepper in a small bowl.",
									"Mix well and leave to marinate for 20 minutes.",
									"Heat a wok until it is very hot. Add one tablespoon of oil and, when it is very hot and slightly smoking, add chicken shreds.",
									"Stir-fry the mixture for about two minutes, and then transfer to a plate.",
									"Reheat the wok, and add remaining oil. Add the garlic and stir-fry for 10 seconds. Add the mange tout and ham and fry for one minute.",
									"Add noodles, light soy sauce, dark soy sauce, rice wine, salt and pepper, the sugar and spring onions and continue to stir-fry for two minutes.",
									"Return chicken to noodle mixture.",
									"Continue to fry for 3-4 minutes, until chicken is cooked.",
									"Stir in sesame oil and give a few final stirs.",
									"Turn onto warm serving platter and serve at once."],
								'10 minutes', 'noodle'),
		
		
		
		
		
		new Recipe('Char Kway Teow', 'noodle1', /* ingredients */
							[     	"1 kg kway teow (fresh flat rice noodles)",
								"4 tbsp garlic, chopped",
								"18 oz bean sprouts",
								"6 oz chinese mustard greens (chye sim)",
								"2 chinese sausages, thinly sliced",
								"12 medium sized prawns, cooked and peeled",
								"5 eggs, beaten",
								"6 tbsp sweet dark soya sauce",
								"3 tbsp sambal chilli paste, or sambal oelek",
								"180 ml seafood stock",
								"300 g cooked squid sliced into 1/2 cm rings",
								"8 oz vegetable oil or lard"],
								
								    /* instructions */
								    [	"Heat a large wok until very hot. Add 3/4 of the oil or lard, lower the heat slightly and fry garlic until fragrant and golden brown.",
								    	"Add kway teow, bean sprouts and chye sim and fry, stirring constantly for about two minutes.",
									"Push the ingredients to the side of the wok, forming a well in the centre.",
									"Add the rest of the oil or lard and heat it.",
									"Add the beaten egg and fry it together with the noodles.",
									"Add the sambal chilli and stir the noodles until the eggs and sambal chilli are mixed into the noodles.",
									"Add the fish sauce and sweet dark soya sauce and fry all ingredients together for another one to two minutes before adding the Chinese sausages, cooked prawns, cooked squid, and seafood stock.",
									"Toss to combine. Serve hot."], 
								'15 minutes', 'noodle'),
		
		
		
		
		
		new Recipe('Chicken and Bacon Ramen', 'noodle3', /* ingredients */
							[     	"1/2 onion",
								"1 tbsp olive oil",
								"1 clove garlic",
								"2 slice bacon",
								"1 chicken breast, sliced",
								"soy sauce",
								"mixed vegetables",
								"1 pk noodles"],
								
								    /* instructions */
								    [	"If you have noodles that need boiling, I would advise putting them on first.",
								    	"Slice the onion and shred the garlic or cut it up (finely).",
									"Cut up the bacon into small pieces and add all of the above into a wok (which already has a small amount of olive oil in it) on a low heat.",
									"Get the chicken and cut it up, and add it to the wok. Cook until the chicken is completely cooked (a good sign of this is that its completely changed color all over), then add the soy sauce.",
									"Allow to cook for a minute extra then add the mixed vegetables and stir.",
									"Add the cooked noodles and serve."], 
								'5 minutes', 'noodle'),
		
		
		
		
		new Recipe('Teriyaki Chicken noodles', 'noodle4', /* ingredients */
							[     	"100 g dried somen noodles",
								"4 tbsp japanese soy sauce",
								"3 tbsp mirin",
								"2 tsp brown sugar",
								"1/4 cup water",
								"2 tbsp peanut or canola oil",
								"2 tsp cornstarch (cornflour) mixed to a paste with 2 tsp water",
								"360 g skinless chicken breast fillets (uncooked) cut into bite-sized pieces",
								"1 carrot, cut into thin shreds",
								"1 scallion, finely sliced on the diagonal",
								"2 tsp ginger, finely grated"],
								
								    /* instructions */
								    [	"Cook the noodles for 3 minutes then drain under cold water and set aside.",
								    	"Mix together the soy sauce, mirin, brown sugar and water in a bowl.",
									"Heat a wok or large frying pan over a high heat, add 1 tablespoon of the oil and stir-fry the chicken for 5 minutes. Remove and set aside.",
									"Scrape the wok/frying pan clean. Add the remaining oil and stir-fry the carrot and bok choy for 7 minutes.",
									"Add the cooked somen noodles and stir-fry for 30 seconds.",
									"Add the ginger, scallion and chicken and stir-fry for 1 minute.",
									"Stir through the sauce then, while stirring constantly, add the cornstarch paste until the sauce thickens."], 
								'5 minutes', 'noodle'),
		
		
		
		
		
		
		new Recipe('Wonton Noodle Soup', 'noodle2', /* ingredients */
							[     	"250 g chicken mince",
								"3 cm piece of fresh ginger, finely grated",
								"1 clove garlic, crushed",
								"2 shallots, finely chopped",
								"2 tbsp water chestnuts, finely chopped",
								"2 tsp sherry",
								"2 1/2 tbsp soy sauce",
								"24 wonton wrappers",
								"1 egg, lightly whisked",
								"2 cup chinese cabbage, shredded",
								"4 cup chicken stock",
								"4 cup water",
								"1 carrot, cut into thin sticks",
								"150 g oyster or shitake mushrooms, sliced",
								"1 bunch bok choy, washed and sliced lengthways"],
								
								    /* instructions */
								    [	"Place chicken mince, ginger, garlic, shallots, water chestnuts, sherry and 2 teaspoons soy sauce in bowl. Mix until well combined.",
								    	"Lay wontons out in a single layer on a clean surface. Spoon about 1/2 teaspoon of the mixture into the centre of each wrapper. Brush edges of with egg. Bring edges together and press to seal. Repeat with remaining wontons and egg.",
									"Place stock, water and remaining soy sauce in a large saucepan. Bring to a simmer. Add carrots and wontons. Simmer, uncovered, for 5 minutes. Add mushrooms, bok choy and cabbage. Simmer for 1-2 minutes or until vegetables are tender.",
									"Divide soup between serving bowls and serve."], 
								'20 minutes', 'noodle'),
		
		
		
		
		new Recipe('Peking-style duck with udon noodle soup', 'noodle6', /* ingredients */
							[     	"1/2 tsp chinese five-spice powder (for the duck sauce)",
								"1 tbsp sesame oil (for the duck sauce)",
								"3 tbsp hoi sin sauce (for the duck sauce)",
								"3 tbsp brown sugar (for the duck sauce)",
								"3 tbsp water (for the duck sauce)",
								"1 tbsp dark soy sauce (for the duck sauce)",
								"2 duck fillets (175g each), skin on. (for the duck sauce)",
								"1 litre chicken stock (for the noodle soup base)",
								"2 dried shitake mushrooms, soaked in 200ml of hot water for 20 mins (for the noodle soup base)",
								"100 g chinese leaf, shredded (for the noodle soup base)",
								"1 tbsp light soy sauce (for the noodle soup base)",
								"1 tbsp rice wine (for the noodle soup base)",
								"1 tbsp rice vinegar (for the noodle soup base)",
								"200 g flat udon noodles, cooked (for the noodle soup base)",
								"3 spring onions, sliced on the diagonal (for the noodle soup base)",
								"40 g bean sprouts (for the noodle soup base)",
								"1 bunch corriander, roughly chopped (for the noodle soup base)",
								"salt and freshly ground pepper (for the noodle soup base)"],
								
								    /* instructions */
								    [	"Preheat the oven to 200C/400F/Gas 6. Place all of the marinade ingredients into a shallow bowl and mix well to coat the duck. Marinate for as long as you can - preferably overnight, but anything more than 20 minutes will do.",
								    	"Heat a dry frying pan until just warm. Place the duck skin-side down and cook for 8-10 minutes, until golden brown.",
									"Turn up the heat, turn over the duck and cook for a further minute until crisp.",
									"Transfer to the oven and cook for 10-15 minutes.",
									"Remove from the oven and rest for five minutes, before slicing.",
									"For the noodle soup, pour the chicken stock into a saucepan and bring to a gentle simmer. Add the shiitake mushrooms and their soaking liquid, and the Chinese leaf.",
									"Add the light soy sauce, rice wine, rice vinegar and udon noodles to the pan. Bring to the boil.",
									"Scatter over the chopped spring onions, bean sprouts and coriander. Season to taste.",
									"To serve, ladle some of the noodle soup into a bowl, place the duck breast on top and serve straightaway."], 
								'15 minutes', 'noodle'),
		
		
		
		
		
		
		
		new Recipe('Noodle salad', 'noodle8', /* ingredients */
							[     	"1 tsp soy sauce",
								"1 tsp sesame oil",
								"1 tsp honey",
								"1/2 tsp dried chilli flakes",
								"100 g rice noodles, cooked according to packet instructions",
								"1/2 red onion, finely chopped",
								"50 g rocket",
								"1 orange, peeled and segmented",
								"salt and freshly ground pepper"],
								
								    /* instructions */
								    [	"Place the soy sauce, sesame oil, sesame seeds, honey and chilli flakes into a large bowl and whisk together.",
								    	"Add the noodles, onion, rocket and orange segments and toss together and season, to taste, with salt and freshly ground black pepper.",
									"To serve, place the noodle salad into the centre of a dish."], 
								'5 minutes', 'noodle')
		
		
		
		
		
	);


Event.observe(window, 'load', function()
	{
		recipes.each(function(a){a.generateHTML();});
		
		
		var clearDiv = new Element('div');
		clearDiv.style.clear = "both";
		
		Element.insert('rice', clearDiv);
		
		clearDiv = new Element('div');
		clearDiv.style.clear = "both";
		
		Element.insert('noodles', clearDiv);
		
		
	});


function hidePopup()
{
	Effect.Fade('gray_bg', {duration: 0.5});
	Effect.Fade('recipe_popup', {duration: 0.5});
}



