﻿function getScrollTop() 
{
	return window.pageYOffset
	|| document.documentElement && document.documentElement.scrollTop
	|| document.body.scrollTop;
}

function positionLogo()
{
	var winHeight = ($(window).height());
	if(getScrollTop()>0)
	{
		var newPosition = getScrollTop() + winHeight - 60;
		$('.fb-logo').css({top:newPosition+'px'});
	}
	else
	{
		var test = winHeight-60;
		$('.fb-logo').css({top:test+'px'});
	}
}

$(function() 
{
	$(window).scroll(positionLogo);
	$(window).resize(positionLogo);
	positionLogo();
});
