Shadowbox.loadSkin('classic', 'js/skins/');

$(document).ready(function() {

	$(window).bind("resize", function() {

		h = $(window).height();
		w = $(window).width();

		movie_h = 768;
		movie_w = 1024;

		if (h < 768 || scale == 1) {
			movie_h = h;
		}

		if (w < 1024 || scale == 1) {
			movie_w = w;
		}

		if (w > h * (1024 / 768) && (movie_h < 768 || scale == 1)) {
			movie_w = h * (1024 / 768);
		} else if (h > w * (768 / 1024) && (movie_w < 1024 || scale == 1)) {
			movie_h = w * (768 / 1024);
		}

		movie_h = parseInt(movie_h);
		movie_w = parseInt(movie_w);

		$(".flashmovie").attr("height", movie_h);
		$(".flashmovie").attr("width", movie_w);

		$("#flash").css("height", movie_h + "px");
		$("#flash").css("width", movie_w + "px");

		$("#flash").css("margin-top", "-" + parseInt(movie_h / 2) + "px");
		$("#flash").css("margin-left", "-" + parseInt(movie_w / 2) + "px");

	});

	$(window).trigger("resize");

	Shadowbox.init();

});

function openBrief(id) {
	Shadowbox.open({
        player:     'iframe',
        content:    'site.php?module=brief&task=display&id='+id,
        width:      700
    });
}

function archief() {
	Shadowbox.open({
        player:     'iframe',
        content:    'site.php?module=archief&task=display',
        width:      700
    });
}

function fotos() {
	Shadowbox.open({
        player:     'iframe',
        content:    'http://picasaweb.google.com/'+picasauser+'/'
    });
}

function mailinglijst() {
	Shadowbox.open({
        player:     'iframe',
        content:    'site.php?module=mailinglijst&task=display',
        width:      700
    });
}

function briefgekregen() {
	Shadowbox.open({
        player:     'iframe',
        content:    'site.php?module=briefgekregen&task=display',
        width:      700
    });
}
