// JavaScript for header button animation
// -------------------------------------------------------------------------------- header buttons animation ---------------------------------------------
window.addEvent('domready', function() 
	{
		$each(['aboutButton','portfolioButton','contactButton'], function(which)
			 {
				 $(which).addEvents({
						'mouseover':
							function(event)
							{
								var buttonFx = new Fx.Tween(this, {															
																	duration: 300,
																	transition: Fx.Transitions.Sine.easeInOut
																  });
								buttonFx.start('top',-26);
							},
						'mouseout':
							function(event)
							{
								var buttonFx = new Fx.Tween(this, {															
																	duration: 300,
																	transition: Fx.Transitions.Sine.easeInOut
																  });
								buttonFx.start('top',0);
							}
									});
	});
});


// -------------------------------------------------------------------------------- thumbs animation ---------------------------------------------

function up(id)
{
var thumbFx = new Fx.Tween(id, {															
						duration: 200,
						transition: Fx.Transitions.Sine.easeInOut
								});
	thumbFx.start('top',-15);
}

function down(id)
{
	var thumbFx = new Fx.Tween(id, {															
						duration: 200,
						transition: Fx.Transitions.Sine.easeInOut
								});
	thumbFx.start('top',0);
}

// -------------------------------------------------------------------------------- language animation ---------------------------------------------
window.addEvent('domready', function() 
	{
		$each(['english','romanian'], function(which)
			 {
				 $(which).addEvents({
						'mouseover':
							function(event)
							{
								var buttonFx = new Fx.Tween(this, {															
																	duration: 200,
																	transition: Fx.Transitions.Sine.easeInOut
																  });
								buttonFx.start('top',18);
							},
						'mouseout':
							function(event)
							{
								var buttonFx = new Fx.Tween(this, {															
																	duration: 200,
																	transition: Fx.Transitions.Sine.easeInOut
																  });
								buttonFx.start('top',22);
							}
									});
	});	});
