var pathExpressInstallFile = escape("/lib/flash/expressInstall.swf");

function initPopups() {

    $.fn.nyroModal.settings.regexImg = '[^\.]\.(jpg|jpeg|png|tiff|gif|bmp)\s*$|image.aspx';
    $.fn.nyroModal.settings.minWidth = 0;
    $.fn.nyroModal.settings.minHeight = 0;

   }

function initHyperlinks() {
	$("a[rel=external]").each(function() {
		$(this).click(function() { window.open($(this).attr("href")); return false; });
		if ($(this).attr("title") == "") $(this).attr("title", "Deze link wordt in een nieuw venster geopend.")
		else $(this).attr("title", "'" + $(this).attr("title") + "' wordt in een nieuw venster geopend.");
	});
}

function initContentFlash() {
    $('.contentflash').each(
        function() {
            var strId = $(this).attr('id');
            var strParams = $(this).find('a').attr('rel').split('|');

            $('#' + strId).flashembed(
            {
                src: strParams[0],
                version: [strParams[1]],
                width: strParams[2],
                height: strParams[3],
                expressInstall: pathExpressInstallFile,
                wmode: 'transparent',
                scale: 'noscale'
            })
        }
    );
}

$(document).ready(function() {

	//Initialiseer hier je scripts
	initContentFlash();
	initPopups();
	initHyperlinks();

	$('#menuList a').each(function() {
		$(this).html($(this).html().replace(' ', '<br>'));
	});

});
