// JavaScript Document
$(document).ready(function(){
		
	//var winHeight;
//		if ( window.innerHeight ) {
//			winHeight = window.innerHeight;
//		}
//		else if ( document.body.clientHeight ) {
//			winHeight = document.body.clientHeight;
//		}
//
//		$("#twitterBadge").css({});
//		
//		top = winHeight - myDiv.height;
		
		
	$("#twitterClose").click(function(){
		var badgeHeight = $("#twitterBadge").height();
		var badgeStatus = $("#twitterBadge").hasClass("twitterBadgeReduce");
		
		var heightReset = 360+badgeHeight;
		var posScroll = $(document).scrollTop();
		var winScroll = window.innerHeight;
		var docScroll = winScroll - badgeHeight;
		
		//alert("badgeHeight  "+badgeHeight);
//		alert("badgeStatus  "+badgeStatus);
//		alert("posScroll  "+posScroll);
//		alert("winScroll  "+winScroll);
//		alert("docScroll  "+docScroll);
		
		
		$("#twitterBadge").toggleClass("twitterBadgeReduce");
		
		if(badgeStatus == true){
				$("#footer").css({height:"435px"});
				//$(document).scrollTop(docScroll);
		
		}else if(badgeStatus == false){
				$("#footer").css({height:"360px"});
				//$(document).scrollTop(docScroll)
		}
		
	});
});
