// JavaScript Document

$(document).ready(function() {
	if ($('#wrapper').html()) {
		yTop = $("#main").offset().top - 105;
		intDelay = 400;
		setTimeout('$("html,body").animate({scrollTop: yTop},"slow")', intDelay);
		setTimeout('setInterval("checkScrollPos();", 10);', intDelay * 3);
	}
	
	$("#twittbutton").click(function() {
		$("#twitterfeedcontent").slideToggle(200);
	});
});

function checkScrollPos() {
	yTop = $("#main").offset().top - 105;
	if (window.pageYOffset < yTop) {
		window.scroll(0, yTop);
	}
}
