$(init);

var _index;

function init()
{
	//alert("init");
	_index = new Index();
}

function Index()
{
	this.onResize();
	window.onresize = this.onResize;
}

Index.prototype.openMailingList = function()
{
	$(".modalBgOverlay").fadeIn("medium");
	
	var f2 = function()
	{
		$(".mailingList").fadeIn("medium");
		resize();
	}
	setTimeout(f2, 500);
}

Index.prototype.closeMailingList = function()
{
	$(".mailingList, .modalBgOverlay").fadeOut("medium");
}

Index.prototype.onResize = function()
{
	var mailingListWindowWidth = 500;
	var marginLeft = (window.innerWidth - mailingListWindowWidth)/2;
	$(".mailingList").css("left", marginLeft + "px");
}

