$(document).ready( function() {
	set_facebookbox_postition();
	$('#facebook_link').click(function(e) {
		e.preventDefault();
		show_facebookbox();
	});
	
});

function set_facebookbox_postition() {
	$('#facebook_box_wrap').css("visisbility", "visible");
	$('#facebook_box_wrap').css("top", "-" + $('#facebook_box_wrap').height() + "px");
}

function show_facebookbox() {
	fb_pos = $('#facebook_box_wrap').position().top;
	fb_ht = $('#facebook_box_wrap').height();
	if (fb_pos == 0) {
		$('#facebook_box_wrap').animate({
			"top": -fb_ht
		}, 600);
	}
	else {
		$('#facebook_box_wrap').animate({
			"top": 0
		}, 600);
	}
}
