jQuery(function($) {
	var slide = false;
	var height = $('#footerTopContainer').height();
	$('#follow,#close').click(function() {
		var docHeight = $(document).height();
		var windowHeight = $(window).height();
		var scrollPos = docHeight - windowHeight + height;
		$('#footerTopContainer').animate({ height: "toggle"}, 1000, 'easeInOutQuad');
		if(slide == false) {
			if($.browser.opera) {
				$('html').animate({scrollTop: scrollPos+'px'}, 1000, 'easeInOutQuad');
			} else {
				$('html, body').animate({scrollTop: scrollPos+'px'}, 1000, 'easeInOutQuad');
			}
			slide = true;
		} else {
			slide = false;
		}
	});
});
