function limpar()
{
	data.fadeOut('slow', function(){data.css({ top: -100, left: 870 }).fadeIn('slow')});
	ney.fadeOut(2000);
	ney2.fadeIn(2000);
	box.fadeOut('slow');
	galho1.animate({ left: -362 }, 600);
	galho2.animate({ right: -362 }, 600);
	galho3.show().animate({ top: -215 }, 1200);
	beijo.animate({ right: -1200 }, 1200);
	logoCaroline.show().animate({ top: 104 }, 2000);
	logogsw.fadeOut(2000);
	logogsw.fadeIn(2000);
}

function addressChangeHandler( event )
{
	event = event || { path:SWFAddress.getValue() };
	
	if( event.path == "/" )
	{

		galho1.show().animate({ left: 0 }, 600);
		galho2.show().animate({ right: -5 }, 600);
		logomz.hide().toggle('slow');
		logoCaroline.show().animate({ top: 104 }, 2000);

	}
	else
	{
		var t = event.path.split( "/" );
		
		if( t[1] == "cidarta" && t.length >= 2 )
		{
			limpar();
			cidarta.fadeIn(2000);
		}
	}
}


$(document).ready(function()
{
	
	logomz = $('.logo');
	galho1 = $('.galho1');
	galho2 = $('.galho2');
	galho3 = $('.galho3');
	logoCaroline = $('.logoCaroline');

	$(".buttons").stop().animate({'opacity':0.4}, 300);
	
	$(".buttons").mouseover(
	function() {
	    $(this).stop().animate({'opacity':1.0}, 300);    
	}),
	
	$(".buttons").mouseout(
	function() {
	    $(this).stop().animate({'opacity':0.4}, 300);    
	});
	
});

SWFAddress.addEventListener( SWFAddressEvent.CHANGE, addressChangeHandler );
addressChangeHandler();
