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;
	});

	$(".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
		});
	});

	$(".galleryKyrgyz").click(function() {
		$.fancybox([
			{
				'href'	: 'http://arcrelief.org/images/Kyrgallery/1.jpg',
				'title'	: 'Uzbek woman whose community was affected by the violence in Kyrgyzstan'
			},
			{
				'href'	: 'http://arcrelief.org/images/Kyrgallery/2.jpg',
				'title'	: 'A restaurant burnt and blown out in the violence'
			},
			{
				'href'	: 'http://arcrelief.org/images/Kyrgallery/3.jpg',
				'title'	: 'A destroyed sewing machine sits in the window of a house, its roof burned off in the riots'
			},
			{
				'href'	: 'http://arcrelief.org/images/Kyrgallery/4.jpg',
				'title'	: 'This family home was only half-destroyed. The family is living in the other half and have actually taken in another family whose home is unlivable.'
			},
			{
				'href'	: 'http://arcrelief.org/images/Kyrgallery/5.jpg',
				'title'	: 'A home on the edge of town, completely destroyed'
			},
			{
				'href'	: 'http://arcrelief.org/images/Kyrgallery/6.jpg',
				'title'	: 'Tea cups in the rubble of a destroyed home'
			},
			{
				'href'	: 'http://arcrelief.org/images/Kyrgallery/7.jpg',
				'title'	: 'S.O.S.'
			},
			{
				'href'	: 'http://arcrelief.org/images/Kyrgallery/8.jpg',
				'title'	: 'This man’s 13 year old son was killed in the violence. The man holds the boy’s burnt shoes.'
			},
			{
				'href'	: 'http://arcrelief.org/images/Kyrgallery/9.jpg',
				'title'	: 'This woman has opened her home to neighbors’ whose homes were destroyed.'
			},
			{
				'href'	: 'http://arcrelief.org/images/Kyrgallery/10.jpg',
				'title'	: 'A group of Uzbek men whose homes are gone.'
			},
			{
				'href'	: 'http://arcrelief.org/images/Kyrgallery/11.jpg',
				'title'	: 'A young Uzbek boy, worried for his family and future.'
			},
			{
				'href'	: 'http://arcrelief.org/images/Kyrgallery/12.jpg',
				'title'	: 'A little Uzbek boy'
			},
			{
				'href'	: 'http://arcrelief.org/images/Kyrgallery/13.jpg',
				'title'	: 'This little girl’s family home was destroyed.'
			}
			
			
			], {
			'padding'			: 4,
			'titlePosition'  	: 'over',
			'width'				: 640,
			'height'			: 480,
			'transitionIn'		: 'none',
			'transitionOut'		: 'elastic',
			'type'              : 'image',
			'changeFade'        : 0
		});
	});
});
