
/* do */ 
Cufon.replace(('#do a.button'), { hover: true, fontFamily: 'Gotham Thin' });
Cufon.replace(('#do .button span'), { fontFamily: 'Gotham Thin'});
Cufon.replace(('#do #box #title'), { fontFamily: 'Gotham Medium' });
Cufon.replace(('#do .content #titleBig'), { hover: true, fontFamily: 'Gotham Thin' });

/* done */
Cufon.replace(('#done a.button'), { hover: true, fontFamily: 'Gotham Thin' });
Cufon.replace(('#done .button span'), { fontFamily: 'Gotham Thin' });
Cufon.replace(('#done .content #titleBig'), { hover: true, fontFamily: 'Gotham Thin' });
Cufon.replace(('#done .content article #title'), { fontFamily: 'Gotham Medium' });
Cufon.replace(('#done .content article .about'), { fontFamily: 'Gotham Medium' });

/* partners */
Cufon.replace(('#partners a.button'), { hover: true, fontFamily: 'Gotham Thin' });
Cufon.replace(('#partners .button span'), { fontFamily: 'Gotham Thin' });
Cufon.replace(('#partners .content #titleBig'), { hover: true, fontFamily: 'Gotham Thin' });
Cufon.replace(('#partners .content article #title'), { fontFamily: 'Gotham Medium' });
Cufon.replace(('#partners .content article .about'), { fontFamily: 'Gotham Medium' });

/* general */
Cufon.replace(('#contact #title'), { fontFamily: 'Gotham Thin' });
Cufon.replace(('#home .wrapper h1'), { fontFamily: 'Gotham Book' });
Cufon.replace(('#home .wrapper h2'), { fontFamily: 'Gotham Book' });
Cufon.replace(('#map #menu a'), { hover: true, fontFamily: 'Gotham Book' });
Cufon.replace(('#boxAddress'), { hover: true, fontFamily: 'Gotham Book' });
Cufon.replace(('#boxAddress1'), { hover: true, fontFamily: 'Gotham Book' });
Cufon.replace(('nav a'), { hover: true, fontFamily: 'Gotham Book' });


$(document).ready(function()
{
	/* home */ 
	if (!$.browser.msie) $('#map_canvas').stop().animate({"opacity": ".7"}, (0));
	if (!$.browser.msie) $('#map_canvas').mouseenter(function(){$('#map_canvas').stop().animate({"opacity": "1"}, (0));});
	if (!$.browser.msie) $('#map_canvas').mouseleave(function(){$('#map_canvas').stop().animate({"opacity": ".7"}, (0));});
	$('article img').mouseenter(function(){$(this).stop().animate({"opacity": ".4"}, (300));});
	$('article img').mouseleave(function(){$(this).stop().animate({"opacity": "1"}, (300));});
	$('#do .button span').mouseenter(function(){$(this).stop().animate({'marginLeft' : "105px"}, (200));});
	$('#do .button span').mouseleave(function(){$(this).stop().animate({'marginLeft' : "100px"}, (200));});
	$('#done .button span').mouseenter(function(){$(this).stop().animate({'marginLeft' : "105px"}, (200));});
	$('#done .button span').mouseleave(function(){$(this).stop().animate({'marginLeft' : "100px"}, (200));});	
	$('#partners .button span').mouseenter(function(){$(this).stop().animate({'marginLeft' : "105px"}, (200));});
	$('#partners .button span').mouseleave(function(){$(this).stop().animate({'marginLeft' : "100px"}, (200));});	
	if (!$.browser.msie) $('#map_canvas').stop().animate({"opacity": ".8"}, (0));
	
	function goToSection(id)
	{	
		$.address.value(id);
		$.address.update();
	}
	
	$("#do .content").hide();
	$("#do .button").click(function(e)
	{
		e.preventDefault();
		expandable = false;
		goToSection('do');
	});
	 
	$("#done .content").hide();
	$("#done .button").click(function(e)
	{
		e.preventDefault();
		expandable = false;
		goToSection('done');
	});
	
	$("#partners .content").hide();
	$("#partners .button").click(function(e)
	{
		e.preventDefault();
		expandable = false;
		goToSection('partners');
	});
	
	
	/* menu home */
	$("nav #menu #buttonDo").click(function(e) { e.preventDefault(); expandable = true; goToSection('do');});
	$("nav #menu #buttonDone").click(function(e) { e.preventDefault(); expandable = true; goToSection('done');});
	$("nav #menu #buttonPartners").click(function(e) { e.preventDefault(); expandable = true; goToSection('partners');});
	$("nav #menu #buttonContact").click(function(e) { e.preventDefault(); expandable = true; goToSection('contact');});

	
});
