	jQuery.noConflict();

	jQuery(document).ready(function()
	{
		loadCarrousel();
		jquery_loading_indicator();
		
		jQuery('a[@rel*=lightbox]').lightBox(
		{
			imageLoading: 'img/lightbox-ico-loading.gif',
			imageBtnClose: 'img/lightbox-btn-close.gif',
			imageBtnPrev: 'img/lightbox-btn-prev.gif',
			imageBtnNext: 'img/lightbox-btn-next.gif',
			fixedNavigation : true
		});

		menuHover();
		
		var get_strings = document.location.search.substr(1).split('&'); // Haalt het ? er af en splitst op &
		for (var i in get_strings) {
			var p = get_strings[i].split('=');
			// We dienen te focussen op een specifieke foto ID
			if (p[0] == 'focus_id') jQuery("#foto_anchor_"+p[1]).click();
		}
		
		/**
		 * In het contactformulier wordt via_anders alleen getoond als via == anders
		 */
		var frm = document.getElementById('frm_contact');
		if (frm != null) {
			var via = frm.elements['via'];
			via.onchange = function () {
				document.getElementById('via_anders').style.display = (via.value == 'anders' ? '' : 'none');
			}
			via.onchange();
		}
	});


	function loadCarrousel() {
		nvsflash = new nvsFlash('/swf/carrousel.swf?page_id='+page_id, 'carrousel_movie', '567', '159', '8');
		nvsflash.setParam("quality", "high");
		nvsflash.setOption('detectorPath', '/swf/flashdetector.swf');
		nvsflash.loadFlash('carrousel');
	}

	function menuHover()
	{
		jQuery('#nav-main ul li a.sub').mouseover(function()
		{
			// hide all visible submenu's
			jQuery('#nav-main ul ul').css('display', 'none');
			// get id for submenu on hover
			var id = jQuery(this).parent().attr('id');
			// display submenu on hover
			jQuery('#'+id+' ul').css('display', 'block');
		});
		
		// hide submenu's and show active submenu
		jQuery('#header').mouseover(function()
		{
			jQuery('#nav-main ul ul').css('display', 'none');			
			jQuery('#nav-main ul li.active ul').css('display', 'block');
		});
		
		// hide submenu's and show active submenu
		jQuery('.page').mouseover(function()
		{
			jQuery('#nav-main ul ul').css('display', 'none');			
			jQuery('#nav-main ul li.active ul').css('display', 'block');
		});
	}

