
$(document).ready(function() {
	
	$("a.foto").fancybox({});
	// animate images opacity
	$('.gallery img').css({opacity:'0.2'});
	$('.gallery img').hover(function(){$(this).stop().animate({opacity:'1'},400)}, function(){$(this).stop().animate({opacity:'0.2'},400)})
	
	// animate buttons
	$('.button1 span').css({backgroundPosition:'50% -285px'})
	$('.button1').hover(function(){
			$(this).find('span').stop().animate({backgroundPosition:'50% -150px'},400,'easeInQuad')
		}, function(){
			$(this).find('span').stop().animate({backgroundPosition:'50% -285px'},400,'easeOutQuad')
		})
	
	//animate list
	$('.list1 li a').hover(function(){
			$(this).stop().animate({paddingLeft:'22'},400,'easeOutBack2')							
		}, function(){
			$(this).stop().animate({paddingLeft:'12'},400,'easeOutQuad')
		})
	// for lightbox
	
	//footer
	moveFooter();  
	adjustContent();
	
 });

$(window).resize(function() 
{
  moveFooter();  
	adjustContent();
});

//footer
function moveFooter()
{
  var vidHeight=$(window).height();
  var footerHeight=33;
  var topY=vidHeight-footerHeight;
  $('.footer').css('top',topY+'px');
}
//cintenuti
function adjustContent()
{
  //main padding top
  var pTop=55;
  var pBot=50;
  var vidHeight=$(window).height();
  var footerHeight=$('.footer').height();
  var contentHeight=vidHeight-footerHeight-pTop;
  $('#content').css('height',contentHeight+'px');
  $('.main').css('height',contentHeight-pBot+'px');
  
}
