$(document).ready(function() {
	
	$().Overlay({
		ClassName: 'Nieuwsbrief',
		URL: AbsPath + 'includes/SpecialPages/Nieuwsbrief/Form.php'
	});
	
	var Height = Math.max( $(document).height(), $(window).height() );
	var Width = $(window).width();
	
	$('#FTPHolder').css( 'width', Width );
	$('#FTPHolder').css( 'height', Height );
	
	$('#DarklayerFTP').css( 'width', Width );
	$('#DarklayerFTP').css( 'height', Height );
	$('#DarklayerFTP').css( 'opacity', 0.8 );
	
	$('a.FTP').bind('click', function(event) {
		event.preventDefault();
		$('#FTPHolder').removeClass('Closed');
		
		$('#DarklayerFTP').show();/*.animate({
				opacity: 0.8
			}, 750, function() {
		});*/
			
		$('#WrapperFTP').show();/*.animate({
				opacity: 1
			}, 750, function() {
		});*/
	});
	
	$('a.CloseFTP, #DarklayerFTP').bind('click', function() {
		CloseFTPLayer();
	});
	
});

function CloseFTPLayer() {
	
	$('#DarklayerFTP').hide();/*.animate({
		opacity: 0
	}, 750, function() {
		
	});*/
	
	$('#WrapperFTP').hide();/*.animate({
		opacity: 0
	}, 750, function() {
	});*/
	$('#FTPHolder').addClass('Closed');
}
