// Logo

var flashvars = {
	delay: '5',
	transitionTime: '2',
	colors: "0x80A1B6,0x3B6E8F,0x00334D,0xA39161,0x876500,0x646E0A,0xB32317,0xD7C300,0x958800"
};
var params = {
	quality: "high",
	wmode: "transparent"
};
var attributes = {id:"logoColorBlock"};
swfobject.embedSWF("/flash/logoColorBlock.swf", "logoColorBlock", "21", "24", "9.0.0", false, flashvars, params, attributes);

function loadAudio(target, file){
	var params = {
		allowfullscreen: true,
		allowscriptaccess: 'always',
		wmode: 'opaque'
	};
	var vars = {
		file: file,
		backcolor: '#01334c',
		frontcolor: '#ffffff'
	};
	swfobject.embedSWF("/flash/lib/jwplayer/player.swf", target, "340", "24", "9.0.0", false, vars, params);
}

function loadJoinFaces(target){
	var params = {
		allowfullscreen: true,
		allowscriptaccess: 'always',
		wmode: 'opaque'
	};
	var vars = {
		deceasedCount: 30,
		livingCount: 117
	};
	swfobject.embedSWF("/flash/join_faces.swf", target, "265", "790", "9.0.0", false, vars, params);
}

function equalHeight(group) {
	tallest = 0;
	group = $(group);
	group.each(function() {
		thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}
$(document).ready(function() {
	equalHeight('.equalHeight');
	// Link hrefs animeren
	var fadeDuration = 150; //time in milliseconds
	$('.arrowLinkRight.marginRight10').hover(function() {
		$(this).stop(true, false).animate({ marginRight: '5px', paddingRight: '17px' }, fadeDuration);
	}, function() {
		$(this).stop(true, false).animate({ marginRight: '10px', paddingRight: '19px' }, fadeDuration);
	});

	// Toggle info at agenda
	$('ul#agendaMain li a.moreInfo').toggle(function() {
			$(this).addClass('open').parent().find('div.info').slideDown(400);
		}, function() {
			$(this).removeClass('open').parent().find('div.info').slideUp(400);
		});
	// Toggle info at contact
	$('ul#contactList li a.moreInfo').toggle(function() {
			$(this).addClass('open').parent().parent().find('div.info').slideDown(400);
		}, function() {
			$(this).removeClass('open').parent().parent().find('div.info').slideUp(400);
		});
	
	//Lightbox
	$('a.fancybox').fancybox({scrolling:'no', padding:7});
	//Send to friend Lightbox
	$('a.sendToFriend').fancybox({
//		scrolling:'no', 
		padding:10,
		type: 'iframe'
	});
	
	// All external links in new window //
	$("a[href^=http]:not([onclick]),a.blank").each(function() {
		if(this.href.indexOf(location.hostname) == -1 || this.className.match(/blank/)) {
			$(this).click(function(){window.open(this.href);return false;});
		}
	});
	
});


