﻿

$(function () {
	var onWhite = 0;
	$("#eur_slideshow, #guests_slideshow, #partners_slideshow, #sponsors_slideshow, #sponsors_footer").css("overflow","hidden");

	
	$("#guests_slides").cycle({
		fx: 'fade', pause: 0, speed: 500
	});
	
	$("#eur_slides").cycle({
		fx: 'fade', pause: 0, timeout: 8000, speed: 3000
	});
	
	$("#partners_slides, #sponsors_slides").cycle({
		fx: 'fade', pause: 0, timeout: 6000, speed: 2000
	});
	
	$("#footer_slides").cycle({
		fx: 'fade', pause: 0, timeout: 4000, speed: 1500
	});
	

	eur_menu();
	$("a[rel='lightbox'], a[href$='.jpg'], a[href$='.jpeg'], a[href$='.gif'], a[href$='.png'], a[href$='.JPG'], a[href$='.JPEG'], a[href$='.GIF'], a[href$='.PNG']").fancybox();
	$(".video").click(function() {
		$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: this.title,
			'width'			: 640,
			'height'		: 385,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			'wmode'				: 'transparent',
			'allowfullscreen'	: 'true'
			}
		});
		return false;
	});
});
function eur_menu(){
$(" #eur_menu ul ").css({display: "none"}); // Opera Fix

	$(" #eur_menu li").click(function(){

		if ($(this).find('ul:first').css("display") == "block"){
			$(this).find('ul:first').css({visibility: "hidden", display: "none"});
			$("#white_bg").css("display","none");
		}else{
			$(" #eur_menu li").not(this).each(function(){
				$(this).find('ul:first').css({visibility: "hidden", display: "none"});
			});
			$("#white_bg").css("display","block");
			$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(100,'linear');
		}
		if($(this).find('ul:first').length){
			//return false;
		}
		
	});
}
