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 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'
            })
        }
    );
       }

       sfHover = function() {
       	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
       	for (var i = 0; i < sfEls.length; i++) {
       		sfEls[i].onmouseover = function() {
       			this.className += " sfhover";
       		}
       		sfEls[i].onmouseout = function() {
       			this.className = this.className.replace(new RegExp(" sfhover\\b"), "");
       		}
       	}
       }
       if (window.attachEvent) window.attachEvent("onload", sfHover);


function initContactForm(){
    
    $('#frmContact').validate();
   }

   $(document).ready(function() {

   	var x = $('.paging').width();
   	var y = $('.paging').parent().width();
   	$('.paging').css('margin-left', (y / 2) - (x / 2) + 'px');

   });


$(document).ready(function() {

    //Initialiseer hier je scripts
    initContentFlash();
    initPopups();
    initContactForm();
});
