jQuery(document).ready(function() {

	$(".videoOverlay").click(function() {
		$.fancybox({
			'padding'		: 2,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: this.title,
			'width'			: 640,
			'height'		: 480,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			    'wmode'				: 'opaque',
				'allowfullscreen'	: 'true'
			}
		});

		return false;
	});

    $("#videoOverlay").trigger('click');
	
	$(".mapOverlay").fancybox({
		'width'				: 640,
		'height'			: 480,
        'autoScale'     	: false,
        'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});

	$(".sofsOverlay").fancybox({
		'width'				: 640,
		'height'			: 480,
        'autoScale'     	: false,
        'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});

	$(".galleryHaiti").click(function() {
		$.fancybox([
			{
				'href'	: 'http://arcrelief.org/images/fGallery/TA_kids.jpg',
				'title'	: 'Kids at Terrain Acra.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/TA_childSpaces.jpg',
				'title'	: 'Andre, a teacher and journalist, is living at Camp Hope with his son, Sebastian (right), his wife, and their two other sons.  Their house was destroyed and they lost everything in the earthquake.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/TA_vegSales.jpg',
				'title'	: 'Marc, 74, used to be a street vendor in Port-au-Prince. Now he sells candy, vegetables, and spicy pork at Terrain Acra. Business is slow, he says.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/TA_womanChild01.jpg',
				'title'	: 'Woman and Child at Terrain Acra.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/TA_dishes.jpg',
				'title'	: 'A mother rinses her baby&#8217;s bottles in their tent at Terrain Acra.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/TA_stand01.jpg',
				'title'	: 'People are setting up small stands like this one in the hopes of making a little income.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/TA_womanChild02.jpg',
				'title'	: 'Woman and Child at Terrain Acra.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/TA_womanRubble.jpg',
				'title'	: 'Just outside of Terrain Acra...'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/TA_manBuilding.jpg',
				'title'	: 'A man builds a temporary shelter in Port-au-Prince.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/TA_dishes02.jpg',
				'title'	: 'A woman washes dishes at her market stall in Terrain Acra.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/TA_childSpaces02.jpg',
				'title'	: 'Child-friendly spaces at Terrain Acra give hundreds of children each day a safe place to play, sing, dance, and learn.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/TA_childSpaces03.jpg',
				'title'	: 'Child-friendly spaces at Terrain Acra give hundreds of children each day a safe place to play, sing, dance, and learn.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/TA_doctor01.jpg',
				'title'	: 'Haitian and American doctors and nurses see about 150 patients a day at Terrain Acra settlement in Port-au-Prince.Our staff have also set up outreach clinics outside of Terrain Acra to reach people in the surrounding neighborhoods who need care.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/TA_jumpRope.jpg',
				'title'	: 'Child-friendly spaces at Terrain Acra give hundreds of children each day a safe place to play, sing, dance, and learn.'
			}
			
			
			], {
			'padding'			: 4,
			'titlePosition'  	: 'over',
			'width'				: 640,
			'height'			: 480,
			'transitionIn'		: 'none',
			'transitionOut'		: 'elastic',
			'type'              : 'image',
			'changeFade'        : 0
		});
	});

        $(".gallerysouthernSudan").click(function() {
		$.fancybox([
			{
				'href'	: 'http://arcrelief.org/images/fGallery/sudan1.jpg',
				'title'	: 'ARC constructed and fully equipped this health center in Magwi County in southern Sudan.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/sudan2.jpg',
				'title'	: 'This child is a patient at one of the clinics in Magwi County.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/sudan3.jpg',
				'title'	: 'Awere Francis Eliobeyi assists a young patient at the Macinidi clinic in southern Sudan.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/sudan4.jpg',
				'title'	: 'Shelf for medication. It&rsquo;s a constant struggle to keep the clinics in southern Sudan running with all the supplies and support they need.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/sudan5.jpg',
				'title'	: 'One young patient is weighed.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/sudan6.jpg',
				'title'	: 'Patrick Tongun is the head of the primary health clinic at Avumadichi.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/sudan7.jpg',
				'title'	: 'A little boy is examined at one of the clinics. Health information posters hang on the wall behind.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/sudan8.jpg',
				'title'	: 'A training for health workers in Magwi County.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/sudan9.jpg',
				'title'	: 'A child with diarrhea is given oral rehydration solution at a clinic.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/sudan10.jpg',
				'title'	: 'ARC Reproductive Health Officer, Joseph Duop discusses preventing mother to child transmission of HIV on the local radio in Malakal County.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/sudan11.png',
				'title'	: 'This plastic sheet on the ground is where many women gave birth.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/sudan12.jpg',
				'title'	: 'When ARC constructed and equipped the new clinics, we made sure they were supplied with things like birthing tables. '
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/sudan13.jpg',
				'title'	: 'This expectant mother waits for an antenatal checkup at the clinic at Avumadichi.'
			}
			
			
			], {
			'padding'			: 4,
			'titlePosition'  	: 'over',
			'transitionIn'		: 'none',
			'transitionOut'		: 'elastic',
			'type'              : 'image',
			'changeFade'        : 0
		});
	});


	$(".galleryHaitiCFS").click(function() {
		$.fancybox([
			{
				'href'	: 'http://arcrelief.org/images/fGallery/cfs001.jpg',
				'title'	: 'ARC created safe spaces for kids – large tents where, Monday through Friday, kids can go to read, draw, sing, play games and do other activities.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/cfs002b.jpg',
				'title'	: 'The teachers in our safe spaces organize games and sports outside, too. Kids of all ages are welcome.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/cfs003.jpg',
				'title'	: 'This is Myrlande. She and her family survived the earthquake. Formerly a kindergarten teacher, she works with kids in the safe spaces. &#8220;I thought by taking care of children, by singing and dancing with them, it would help me deal with my grief.&#8221;'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/cfs004.jpg',
				'title'	: 'Kids are split into groups with other kids their age.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/cfs005.jpg',
				'title'	: 'Drawing and coloring are some of the kids favorite activities.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/cfs006.jpg',
				'title'	: 'This is a drawing that Francois, age 8, did of his makeshift home. He said he used black because his home &#8217;is not so nice&#8217;.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/cfs007.jpg',
				'title'	: 'The safe spaces are important for parents, too. It&#8217;s a place they can bring their children as they work to pick up the pieces of their lives.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/cfs008.jpg',
				'title'	: '6-year-old Sophonie drew this picture of where she lives.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/cfs009.jpg',
				'title'	: 'Sophonie with her drawing.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/cfs010.jpg',
				'title'	: 'Darline, age 6, sits with other kids her age and draws her makeshift home.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/cfs011.jpg',
				'title'	: 'Darline&#8217;s drawing.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/cfs012.jpg',
				'title'	: 'The teachers for the program are all earthquake survivors themselves who understand what the children are going through.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/cfs013.jpg',
				'title'	: 'About 1&#8218;000 kids visit the spaces every day.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/cfs014b.jpg',
				'title'	: 'A simple rope can be a lot of fun. And some small sticks&#8218; string and a plastic bag can mean hours of kite-flying.'
			}		
			
			], {
			'padding'			: 4,
			'titlePosition'  	: 'over',
			'transitionIn'		: 'none',
			'transitionOut'		: 'elastic',
			'type'              : 'image',
			'changeFade'        : 0
		});
	});

	$(".gallerySomalia").click(function() {
		$.fancybox([
			{
				'href'	: 'http://arcrelief.org/images/fGallery/som1.jpg',
				'title'	: 'A severe drought and famine is devastating the country of Somalia. Families who rely on rain to grow their crops have been left with nothing to eat.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/som2.jpg',
				'title'	: 'They pack up what they can carry and leave everything else behind to seek help. Many travel on foot for days – even weeks – with little to eat and drink along the way.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/som3.jpg',
				'title'	: 'While some have been fleeing to Kenya and Ethiopia, others have been traveling to Mogadishu, the capital of Somalia. When they arrive, they find little help.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/som4.jpg',
				'title'	: 'Far too many people are living in makeshift tents built from sticks, blankets, clothing and even plastic.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/som5.jpg',
				'title'	: 'Some have sought shelter in bombed-out buildings with little access to clean water or sanitary latrines.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/som6.jpg',
				'title'	: 'Others are living in camps for internally displaced people.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/som7.jpg',
				'title'	: 'We are working in Mogadishu and in towns on the border between Somalia and Kenya, helping people who are desperate.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/som8.jpg',
				'title'	: 'In Rajo Camp in Mogadishu, we built this water system that can serve 50,000 people.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/som9.jpg',
				'title'	: 'We delivered beds and mattresses, mosquito nets, computers and other essentials to Banadir Hospital in Mogadishu. We’re also working to open a cholera treatment unit, a nutrition stabilization center and child-friendly spaces.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/som10.jpg',
				'title'	: 'With our partner, the American Relief Agency for the Horn of Africa (ARAHA), we distributed food, cooking pots and other necessities to families who had fled to Mogadishu.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/som11.jpg',
				'title'	: 'People are grateful for any help they receive, and many have no access to assistance.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/som12.jpg',
				'title'	: 'Here in the United States, Somali-American youth are pitching in to do anything they can to help. A group of students recently held a walk in Minnesota to raise awareness about the emergency.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/som13.jpg',
				'title'	: 'About 200 people walked more than 6 miles from Minneapolis to the Minnesota State Capitol in St. Paul.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/som14.jpg',
				'title'	: 'The Hope to End Hunger student group has also held a variety of other fundraisers, including car washes, to raise money for the famine.  All together, they’ve raised more than $11,000!'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/som15.jpg',
				'title'	: 'In addition to car washes, they’ve organized picnics, a basketball tournament and bake sales. They’ve knocked on doors and have collected money at malls – all in an effort to help the people of Somalia.'
			}		
			
			], {
			'padding'			: 4,
			'titlePosition'  	: 'over',
			'transitionIn'		: 'none',
			'transitionOut'		: 'elastic',
			'type'              : 'image',
			'changeFade'        : 0
		});
	});

	$(".galleryHaitiHH").click(function() {
		$.fancybox([
			{
				'href'	: 'http://arcrelief.org/images/fGallery/hh001.jpg',
				'title'	: 'Students at Maple Grove High School in Minnesota dyed their hair for Haiti and raised thousands of dollars for earthquake survivors.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/hh002.jpg',
				'title'	: 'A Hope for Haiti fundraising concert.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/hh003.jpg',
				'title'	: 'Simona Palenga managed Terrain Acra Camp for several months right after the earthquake. She made sure all the families had basic essentials like clean water, shelter and sanitation.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/hh004.jpg',
				'title'	: 'Ann Ferguson and Diane Schadewald volunteered for several weeks as nurses at Terrain Acra Camp.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/hh005.jpg',
				'title'	: 'The staff of ARC&#8217;s clinic at Terrain Acra Camp in Port-au-Prince.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/hh006.jpg',
				'title'	: 'Dr. Tshianda Alerte grew up in Port-au-Prince, before going to school in the U.S. He has managed ARC&#8217;s medical programs for the last year.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/hh007.jpg',
				'title'	: 'Groups of kids around the world held fundraisers. At this party, the kids gave up some of their presents to raise money for kids in Haiti.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/hh008.jpg',
				'title'	: 'Some families have &#8216;Slept out for Haiti&#8217;, spending one night outside to raise money to build homes for Haitians who lost their homes in the quake.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/hh009.jpg',
				'title'	: 'Architects from the University of Minnesota and other agencies have given their time to help plan shelters and communities where Haitians will enjoy living.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/hh010.jpg',
				'title'	: 'ARC&#8217;s Shelter and Community Development Team is leading the effort to build some 2,000 transitional family shelters in the Delmas area of Port-au-Prince.'
			}		
			
			], {
			'padding'			: 4,
			'titlePosition'  	: 'over',
			'transitionIn'		: 'none',
			'transitionOut'		: 'elastic',
			'type'              : 'image',
			'changeFade'        : 0
		});
	});

	$(".galleryN4N").click(function() {
		$.fancybox([
			{
				'href'	: 'http://arcrelief.org/images/fGallery/N4N001.jpg',
				'title'	: 'Sambusa Cook-Off Contestant Fartun. Contestants helped raise over $30,000'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/N4N002.jpg',
				'title'	: 'Sambusa Contestant Sade Hashi with eager Sambusa Samplers.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/N4N003.jpg',
				'title'	: 'Winners of the Neighbors for Nations soccer tournament'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/N4N004.jpg',
				'title'	: 'The Neighbors for Nations tent has been traveling from festivals to conferences to picnics...'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/N4N005.jpg',
				'title'	: 'The 1 Million Voices Petition!'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/N4N006.jpg',
				'title'	: 'Car wash for Somalia.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/N4N007.jpg',
				'title'	: 'Neighbors for Nations Advocates got the chance to talk with U2 and K&#39;Naan.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/N4N008.jpg',
				'title'	: 'Another car wash at Karmel Somali Mall.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/N4N009.jpg',
				'title'	: 'Picnic fundraiser for Famine Relief.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/N4N010.jpg',
				'title'	: 'Neighbors for Nations tents at the N4N Soccer Tournament.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/N4N011.jpg',
				'title'	: 'More than 3,000 people have signed the petition already.'
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/N4N012.jpg',
				'title'	: ''
			},
			{
				'href'	: 'http://arcrelief.org/images/fGallery/N4N013.jpg',
				'title'	: 'Attendees enjoy barbecue at the picnic for Famine Relief.'
			}
			], {
			'padding'			: 4,
			'titlePosition'  	: 'over',
			'transitionIn'		: 'none',
			'transitionOut'		: 'elastic',
			'type'              : 'image',
			'changeFade'        : 0
		});
	});
});

