    	var isInited = false;
		var bottomPadding = -8;
		var menuWidth = 220;
		$(document).ready(function(){								
			if(!isInited){
				isInited = true;
				setTimeout('doInit()',10);
			}
		})
		
		function doInit(){

            // Browser fixes
			if ($.browser.msie && $.browser.version<7) {
				// ie 6 zonder schaduw
				$('.mains').css("background-color","#FFFFFF");
				$('.mains').css("margin","0px 0px 0px 22px");
				$('.mains').css("padding","0px 0px 0px 0px");
				$('.mains').css("border-left","1px solid #d1d1d1");
				$('.mains').css("border-right","1px solid #d1d1d1");
				$('.mains').css("border-bottom","1px solid #d1d1d1");
				$('.mains li').css("margin-right","-1px");
				$('.mains li').css("border-right","1px solid #d1d1d1");
				$('.mains li ul').css("left",menuWidth + "px");
				$('.mains li ul,.mains li ul li').css("width",(menuWidth + 20) + "px");

				// dubbele class selection bug voor IE6
				$('.w694.title .ptop').css("background-image","url('/images/panels/top_title_694.gif')");
				$('.w220.title .ptop').css("background-image","url('/images/panels/top_title_220.gif')");
				$('.w217.title .ptop').css("background-image","url('/images/panels/top_title_217.gif')");

				$('.mijnpanel.forms .pcontent').css("padding","10px 2px 0px 30px");			
				
				$('.w694.button .pbottom').css("background-image","url('/images/panels/bottom_button_694.gif')");
				$('.w220.button .pbottom').css("background-image","url('/images/panels/bottom_button_220.gif')");
				$('.w217.button .pbottom').css("background-image","url('/images/panels/bottom_button_217.gif')");				
				
				bottomPadding = 0;
			} else {
				// shaduw toepassen ie 7 en FF
				var strShadow = "<div class=\"wit\"></div><div class=\"shd shdLeftTop\"></div><div class=\"shd shdLeft\"></div><div class=\"shd shdLeftBottom\"></div><div class=\"shd shdBottom\"></div><div class=\"shd shdRightBottom\"></div><div class=\"shd shdRight\"></div><div class=\"shd shdRightTop\"></div>";
				$('.mains').prepend(strShadow);				
			}
				
		
		
			// Niveau 1 
			$(".mains li:has(li)").addClass("subs");

			// verberg uitklapmenus
			$('#menu li ul').css("visibility","visible");
			$('.mains').hide();
			$('.subs>ul').hide();
		


			// mouse over voor tabs
			$("#maintabs>a").hover(
				function (){
					$('img',this).each(function(i){			
						if (this.src.indexOf('selected')==-1) {
							//this.src = String(this.src).split(".").join("_hover.");
							var ext = this.src.substr(this.src.lastIndexOf("."),this.src.length-this.src.lastIndexOf("."));
						    this.src = this.src.substr(0,this.src.lastIndexOf("."))+"_hover"+ext;							
						}
					})	
					
					$(this).css("z-index","1");					
				},
				function(){				
					$('img',this).each(function(i){
						this.src = String(this.src).split("_hover").join("");						
					})
					$(this).css("z-index","0");					
				}
			)
			
			
			// mouse over voor niveau 1
			//$("#menu>li").hoverIntent(
			var config = {
			    sensitivity: 3,
			    interval: 20,
			    over: 
				function(){		
					// hoover image
					$('img[class!=selected]',this).each(function(i){
						this.src = this.src.replace("_link.gif","_hover.gif");
					})	
					
					if ($('.mains li',this).length>0) {
					    // voorkom menu uitklap over andere elementen in IE
    					if ($.browser.msie) $('.leaderboards,.panel,.panes,.title,.header_plus,.parentNode,.verdiepingpcontent,.verdiepjaarrektab,.woordencontent').css("z-index","-5");
    					
    					// stop flash
    				    if (document.getElementById('flashleaderboard')){
    				        try { document.getElementById('flashleaderboard').stopPlay(); } 
    				        catch(err) { };
    				        try { document.getElementById('flashleaderboard').StopPlay(); }
    				        catch(err) { };
    			        }
    					
					    // animatie
					    $('.mains li',this).css({opacity: 0});	
					    $('.shdLeft,.shdRight,.shdLeftTop,.shdRightTop',this).hide();
					    $('.wit',this).css('width','auto').css('height','auto');
					    $('.mains',this).css("left",$(this).attr("offsetLeft")-22).slideDown(250).queue(function(){ 
						    $('li',this).css({opacity: 100});			
						    $('.shdLeft,.shdRight,.shdLeftTop,.shdRightTop').show();
						    
    						if ($.browser.msie) $('.leaderboards,.panel,.panes,.title,.header_plus,.parentNode,.verdiepingpcontent,.verdiepjaarrektab,.woordencontent').css("z-index","-5");
						    $(this).dequeue();
					    });
					    $('.mains>li.subs>ul',this).css("border","0px solid #FFFFFF");		// < IE 6													    									
					    $('ul>li:first',this).css("borderTop","1px solid #FFFFFF");	
					}										
				},
				timeout: 0,
				out:
				function(){								
					// hoover image
					$('img[class!=selected]',this).each(function(i){
						this.src = this.src.replace("_hover.gif","_link.gif");
					})

					// animatie
					$('.mains',this).css("width",menuWidth).slideUp(200);
					
					$('.mains li',this).css({opacity: 0});
					$('.shdLeft,.shdRight,.shdLeftTop,.shdRightTop',this).hide();
					$('.wit',this).css('width','auto').css('height','auto');
											
					if ($.browser.msie) $('.leaderboards,.panel,.panes,.title,.header_plus,.parentNode,.verdiepingpcontent,.verdiepjaarrektab,.woordencontent').css("z-index","0");				 
					
					// start flash					
    				if (document.getElementById('flashleaderboard')){
				        try { document.getElementById('flashleaderboard').play(); } 
				        catch(err) { };
				        try { document.getElementById('flashleaderboard').Play(); }
				        catch(err) { };
    			    }
				}
			};
			$("#menu>li").hoverIntent(config);
			
			
			// mouse over voor niveau 2
			$(".subs").hoverIntent(
				function(){
					//if ($(this.parentnode).queue().length==0) {
						$("a:first",this).addClass('selected');
						if ($('ul li',this).length>0) {						
						    $('ul li',this).css({opacity: 0});
						    
    						// hoogte berekenen
						    menuHeight = 3+$(this).height();
						    $(this).siblings('li').each(function(i) {
							     menuHeight += $(this).height();
						    });

						    var animSettings = {};
                            //                             hoogte 1  , hoogte niveau 2
						    animSettings.height = Math.max(menuHeight,$(this).attr("offsetTop") + $('ul',this).height() + bottomPadding ); //- $(this).attr("offsetHeight")+20
                            animSettings.width = menuWidth*2;
                            $('li',this.parentNode.parentNode).css("borderRight","1px solid #d1d1d1");
                            
                            if ($.browser.msie && animSettings.height>$(this.parentNode).height()) {
                                // groeien
                                $('.wit',this.parentNode).css('width',$(this.parentNode).width()).css('height',$(this.parentNode).height()+2);
                                $('.wit',this.parentNode).stop().animate(animSettings,350);
                            }
						    $(this.parentNode).stop().animate(animSettings,350).queue(function(){
							    $('li',this.parentNode).css("borderRight","1px solid #d1d1d1");
							    $('ul li',this).css({opacity: 100});
							    $(this).dequeue();
						    });
                            if ($.browser.msie && animSettings.height<=$(this.parentNode).height()) {
                                // krimpen
                                $('.wit',this.parentNode).css('width',$(this.parentNode).width()).css('height',$(this.parentNode).height()+2);
                                $('.wit',this.parentNode).stop().animate(animSettings,350);
                            }
						    $('ul',this).show().css("top",$(this).attr("offsetTop"));				    						
						    $('ul>li:first',this).css("borderTop","1px solid #FFFFFF");										
						}
					//}
				},
				function(){					
					$("a:first",this).removeClass('selected');
					$('ul',this).hide();

                    // hoogte bepalen
					var animSettings = {};
					animSettings.height = 3+$(this).height();
					$(this).siblings('li').each(function(i) {
						 animSettings.height += $(this).height();
					});
					 
					animSettings.width = menuWidth;
                    $(this.parentNode).stop().animate( animSettings,350).queue(function(){
					    if ($(this).width()<menuWidth+2) $('li',this.parentNode.parentNode).css("borderRight","0px solid #d1d1d1");					    					    					    
					    $(this).dequeue();
					});
					if ($.browser.msie) {
                        $('.wit',this.parentNode).css('width',$(this.parentNode).width()).css('height',$(this.parentNode).height()+2);
                        $('.wit',this.parentNode).stop().animate(animSettings,350);
                    }
				}
			);			
			
			// Ga naar volgende veld bij volledige invoer (alleen nummeriek!)
			$('.gotonext').keyup(
			    function(e){	
			        if (e.which!=8 && e.which!=9 && e.which!=16 && e.which!=37 && e.which!=39 && e.which!=46 && $(this).attr('value').length == $(this).attr('maxlength')) {			            
			            $(this).next().focus();				           	         
			        }			        
			    }
			)			
			
			// Verdiepingspagina meer
			$('.verdiepingmeer').after('<p class="verdiepingmeerlink">Meer</p>');
			$('.verdiepingmeerlink').click(
			    function(){
			        if ($(this).prev('.verdiepingmeer').css('display')=='none') {
			            $(this).prev('.verdiepingmeer').slideDown('fast');
			            $(this).css('backgroundImage',$(this).css('backgroundImage').replace('more','less'));
			            $(this).html($(this).html().replace('Meer','Minder'));			        
			        } else {
			            $(this).prev('.verdiepingmeer').slideUp('fast');			        
			            $(this).css('backgroundImage',$(this).css('backgroundImage').replace('less','more'));
			            $(this).html($(this).html().replace('Minder','Meer'));
			        } 
			           
			    }
			);

            // Accordion
            $('.news_block').css('display','block');
            $('#news_home,#accordion_zakelijk').accordion({
		    	selectedClass: 'news_active',
		    	header: '.news_trigger',
		    	event: 'mouseover'		     
			});										
			
			doInitDynamic();
			
		}

        // Javascript functies die na elke AJAX actie moeten worden uitgevoerd. 		
		function doInitDynamic(){
		
		    // Footer goed zetten indien er sprake is van aanmeldformulieren
		    newHeight = $(".tabContent:not(.CBhideThisNode)").height() ;
		    if (newHeight>0) $("#content").height(newHeight + 250);
		          
            
    	}

