$(document).ready(function(){
	/* drop down - languages */
	$('#view-lang, .select').hover(function(){
	$('.languages, .select').stop(true, false).animate({ height: '250px' });
	}, function() {
		$('.languages').stop(true, false).animate({ height: '28px' });
		$('.select').stop(true, false).animate({ height: '0px' });
	});
	/* drop down - partnerships*/
	$('#view-partnership, .partners').hover(function(){
	$('.partnerships, .partners').stop(true, false).animate({ height: '185px' });
	}, function() {
		$('.partnerships').stop(true, false).animate({ height: '28px' });
		$('.partners').stop(true, false).animate({ height: '0px' });
	});
	/* drop down - about f1*/
	$('#view-about, .about').hover(function(){
	$('.about-f1, .about').stop(true, false).animate({ height: '150px' });
	}, function() {
		$('.about-f1').stop(true, false).animate({ height: '28px' });
		$('.about').stop(true, false).animate({ height: '0px' });
	});
	/* drop down - programs*/
	$('#view-programs, .programs, #europe, #asia, #cis, #latinamerica, #africa, #northamerica').hover(function(){
	$('.programmes, .programs').stop(true, false).animate({ height: '200px' });
	}, function() {
		$('.programmes').stop(true, false).animate({ height: '28px' });
		$('.programs').stop(true, false).animate({ height: '0px' });
	});

	/* slide out - programs*/
	$('#view-europe, #europe').hover(function(){
	$('#europe').stop(true, false).animate({ width: '87%', height :'310px' });
	}, function() {
		$('#europe').stop(true, false).animate({ width: '87%', height: '0px' });
	});
	/* slide out - programs*/
	$('#view-asia, #asia').hover(function(){
	$('#asia').stop(true, false).animate({ width: '87%', height :'200px' });
	}, function() {
		$('#asia').stop(true, false).animate({ width: '87%', height: '0px' });
	});
	/* slide out - programs*/
	$('#view-cis, #cis').hover(function(){
	$('#cis').stop(true, false).animate({ width: '87%', height :'250px' });
	}, function() {
		$('#cis').stop(true, false).animate({ width: '87%', height: '0px' });
	});
	/* slide out - programs*/
	$('#view-latinamerica, #latinamerica').hover(function(){
	$('#latinamerica').stop(true, false).animate({ width: '87%', height :'200px' });
	}, function() {
		$('#latinamerica').stop(true, false).animate({ width: '87%', height: '0px' });
	});
	/* slide out - programs*/
	$('#view-africa, #africa').hover(function(){
	$('#africa').stop(true, false).animate({ width: '87%', height :'100px' });
	}, function() {
		$('#africa').stop(true, false).animate({ width: '87%', height: '0px' });
	});
	/* slide out - programs*/
	$('#view-na, #northamerica').hover(function(){
	$('#northamerica').stop(true, false).animate({  width: '87%', height :'100px' });
	}, function() {
		$('#northamerica').stop(true, false).animate({  width: '87%', height: '0px' });
	});

	/* render - hide registration form */
	$('.show-forms').click(function(){
		$('div#signup').css({top:'50%',left:'50%',margin:'-'+($('div#signup').height() / 2)+'px 0 0 -'+($('div#signup').width() / 2)+'px'});
	});
	$('img.close-form').click(function(){
		$('div#signup').css({top:'0px',left:'-2000px',margin:'-'+($('div#signup').height() / 2)+'px 0 0 -'+($('div#signup').width() / 2)+'px'});
	});

	/* render - hide moment photo */
	$('.show-moment').click(function(){
		$('div#moment').css({top:'50%',left:'50%',margin:'-'+($('div#moment').height() / 2)+'px 0 0 -'+($('div#moment').width() / 2)+'px'});
		$('div#moment-2010').css({top:'0px',left:'-2000px',margin:'-'+($('div#moment-2010').height() / 2)+'px 0 0 -'+($('div#moment-2010').width() / 2)+'px'});
	});
	$('img.close-moment').click(function(){
		$('div#moment').css({top:'0px',left:'-2000px',margin:'-'+($('div#moment').height() / 2)+'px 0 0 -'+($('div#moment').width() / 2)+'px'});
	});
	/* render - hide moment photo 2010 */
	$('.show-moment-2010').click(function(){
		$('div#moment-2010').css({top:'50%',left:'50%',margin:'-'+($('div#moment-2010').height() / 2)+'px 0 0 -'+($('div#moment-2010').width() / 2)+'px'});
		$('div#moment').css({top:'0px',left:'-2000px',margin:'-'+($('div#moment-2010').height() / 2)+'px 0 0 -'+($('div#moment').width() / 2)+'px'});
	});
	$('img.close-moment-2010').click(function(){
		$('div#moment-2010').css({top:'0px',left:'-2000px',margin:'-'+($('div#moment-2010').height() / 2)+'px 0 0 -'+($('div#moment-2010').width() / 2)+'px'});
	});

	/* render - registration form swf */
	renderDiv = function() 
	{
		$('div#signup').css({top:'50%',left:'50%',margin:'-'+($('div#signup').height() / 2)+'px 0 0 -'+($('div#signup').width() / 2)+'px'});

	}

	/* render - hide moment photo */
	$('.open-moment').click(function(){
		$('div#moment').css({top:'50%',left:'50%',margin:'-'+($('div#moment').height() / 2)+'px 0 0 -'+($('div#moment').width() / 2)+'px'});
	});
	$('img.close-moment').click(function(){
		$('div#moment').css({top:'0px',left:'-2000px',margin:'-'+($('div#moment').height() / 2)+'px 0 0 -'+($('div#moment').width() / 2)+'px'});
		$('img#bahrain, img#melbourne, img#sepang, img#shanghai, img#valencia, img#suzuka, img#singapore, img#silverstone, img#monza, img#montreal, img#monaco, img#istanbul, img#germany, img#budapest, img#belgium, img#barcelona, img#korea, img#brasil, img#yasmarina').css({display:'none'});
		$('p#bahrain-cap, p#melbourne-cap, p#sepang-cap, p#shanghai-cap, p#valencia-cap, p#suzuka-cap, p#singapore-cap, p#silverstone-cap, p#monza-cap, p#montreal-cap, p#monaco-cap, p#istanbul-cap, p#germany-cap, p#budapest-cap, p#belgium-cap, p#barcelona-cap, p#korea-cap, p#brasil-cap, p#yasmarina-cap').css({top:'-2000px'});
	});

	$('.moment-bahrain').click(function(){
		$('img#bahrain').css({display:'block'});
		$('p#bahrain-cap').css({top:'0px'});
	});
	$('.moment-melbourne').click(function(){
		$('img#melbourne').css({display:'block'});
		$('p#melbourne-cap').css({top:'0px'});
	});
	$('.moment-sepang').click(function(){
		$('img#sepang').css({display:'block'});
		$('p#sepang-cap').css({top:'0px'});
	});
	$('.moment-shanghai').click(function(){
		$('img#shanghai').css({display:'block'});
		$('p#shanghai-cap').css({top:'0px'});
	});
	$('.moment-valencia').click(function(){
		$('img#valencia').css({display:'block'});
		$('p#valencia-cap').css({top:'0px'});
	});
	$('.moment-suzuka').click(function(){
		$('img#suzuka').css({display:'block'});
		$('p#suzuka-cap').css({top:'0px'});
	});
	$('.moment-singapore').click(function(){
		$('img#singapore').css({display:'block'});
		$('p#singapore-cap').css({top:'0px'});
	});
	$('.moment-silverstone').click(function(){
		$('img#silverstone').css({display:'block'});
		$('p#silverstone-cap').css({top:'0px'});
	});
	$('.moment-monza').click(function(){
		$('img#monza').css({display:'block'});
		$('p#monza-cap').css({top:'0px'});
	});
	$('.moment-montreal').click(function(){
		$('img#montreal').css({display:'block'});
		$('p#montreal-cap').css({top:'0px'});
	});
	$('.moment-monaco').click(function(){
		$('img#monaco').css({display:'block'});
		$('p#monaco-cap').css({top:'0px'});
	});
	$('.moment-istanbul').click(function(){
		$('img#istanbul').css({display:'block'});
		$('p#istanbul-cap').css({top:'0px'});
	});
	$('.moment-germany').click(function(){
		$('img#germany').css({display:'block'});
		$('p#germany-cap').css({top:'0px'});
	});
	$('.moment-budapest').click(function(){
		$('img#budapest').css({display:'block'});
		$('p#budapest-cap').css({top:'0px'});
	});
	$('.moment-belgium').click(function(){
		$('img#belgium').css({display:'block'});
		$('p#belgium-cap').css({top:'0px'});
	});
	$('.moment-barcelona').click(function(){
		$('img#barcelona').css({display:'block'});
		$('p#barcelona-cap').css({top:'0px'});
	});
	$('.moment-korea').click(function(){
		$('img#korea').css({display:'block'});
		$('p#korea-cap').css({top:'0px'});
	});
	$('.moment-brasil').click(function(){
		$('img#brasil').css({display:'block'});
		$('p#brasil-cap').css({top:'0px'});
	});
	$('.moment-yasmarina').click(function(){
		$('img#yasmarina').css({display:'block'});
		$('p#yasmarina-cap').css({top:'0px'});
	});





	$('img.close-vote').click(function(){
		$('div#voted').css({display:'block'});
	});




});
