function checkHeight() {
	if($("#container").height() < $(window).height()) {
		var offset = $("#container").offset();
		$("#container").height($(window).height());
		$("#footer").css(
			{
				"position" : "absolute",
				"left" : (offset.left + (($("#container").width() - $("#footer").width()) * 0.5)) ,
				"top" : ($("#container").height() - ($("#footer").height() + 35))
			});
	} else {
		$("#footer").css({
				"position" : "relative",
				"left" : "0px",
				"top" : "0px"
		});
	}
};


$(document).ready(function() {

	$("#nav-login").click(function() {
		$.blockUI({
			message: $("#loginmodal"),
			css: {
				color: '#fff'
			}			
		});
		return false;
	});
	
	$("#closelogin").click(function() {
		$.unblockUI();
		return false;
	});
	
	$("input#ref").focus(function() {
		if($(this).val() == "< Type Your Affiliate ID >") {
			$(this).val("");
		}
	}).blur(function() {
		if($(this).val() == "") {
			$(this).val("< Type Your Affiliate ID >");
		}
	});

	checkHeight();

	$(window).bind("resize",function() {
		checkHeight();
	});
});
