Mask = function(){
	this.resize = function(){
		$('.popupBlack').height($(document).height());
		$('.popupBlack').width($(window).width() < $(document.body).width() ? $(document.body).width() : $(window).width());
	}
	
	this.show = function(){
		$('.popupBlack').stop(true).css('opacity', 0).show().fadeTo(333, 0.5);
	}
	
	this.hide = function(){
		$('.popupBlack').stop(true).fadeOut(333, 0, function(){$(this).hide()});
	}
	
}

BodyMask = new Mask();

$(document).ready(function(){
	BodyMask.resize();
	$(window).resize(function(){
		BodyMask.resize();
	});
});
