function initMenus(){$('ul.menu ul').hide();$.each($('ul.menu'), function () {//alert(checkElement.className);//$('ul.menu ul.expanded').show();$('ul.menu ul.expanded').slideDown('normal');});$('ul.menu li h2').click(function() {var checkElement = $(this).next();var parent = this.parentNode.parentNode.id;if((checkElement.is('ul')) && (checkElement.is(':visible'))) {checkElement.slideUp('normal'); }if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {$('ul.menu ul.expanded').slideUp('normal');$('ul.menu ul.notexpanded').slideUp('normal');checkElement.slideDown('normal'); }} ); $('ul.menu li h3').click(function() {var checkElement = $(this).next();var parent = this.parentNode.parentNode.id;if((checkElement.is('ul')) && (checkElement.is(':visible'))) {checkElement.slideUp('normal'); }if((checkElement.is('ul')) && (!checkElement.is(':visible'))) { checkElement.slideDown('normal'); }} );} $(document).ready(function() {initMenus();var initiateMenu = function() { $("ul#dmenu").children().each(function() {$(this).find("a").each(function(){ $(this).css("background","url('/images/menu/"+$(this).attr("id")+"-sprite.png') no-repeat" ); $(this).find("span").hide();});}); $("#angst-en-paniek,#cognitieve-gedragstherapie,#hartcoherentie-training, #overige-depressie-behandelingen").css("height", "22px"); $("ul.menu li h2 a:not(.hover), ul.menu li a").hover(function(){ $(this).css("background-position","0 -37px"); }, function(){ $(this).not('.hover').css("background-position","0 0"); });$("ul.menu li ul li h3 a").hover(function(){ $(this).css("background-position","0 -22px"); }, function(){ $(this).not('.hover').css("background-position","0 0"); }); $("ul.menu li ul li ul li h4 a").hover(function(){ $(this).css("background-position","0 -22px"); }, function(){ $(this).not('.hover').css("background-position","0 0"); }); var location = window.location.pathname;if(location != "/"){ loc = location.split("/");total = loc.length;if(loc[total-1] != "")location = loc[total-1] elselocation = loc[total-2];if(location =='amersfoort' || location =='amsterdam' || location =='breda' || location =='eindhoven' || location =='heerenveen' || location =='utrecht' || location =='rotterdam' || location =='arnhem' || location =='denbosch' || location =='denhaag')location = loc[total-3];height = $("#"+location).css("height");$("#"+location).css("background-position","0 -"+height).addClass("hover"); }else{ $(".hover").css("background","url('/images/menu/"+$(".hover").attr("id")+"-sprite.png') no-repeat" );$("#home").css("background-position","0 -37px").addClass("hover"); } }();var initiateTabs = function() {//When page loads...$(".tab_content").hide(); //Hide all content$("ul.tabs li:first-child").addClass("active").show(); //Activate first tab$(".tab_content:first-child").show(); //Show first tab content//On Click Event$("ul.tabs li").click(function() {$("ul.tabs li").removeClass("active"); //Remove any "active" class$(this).addClass("active"); //Add "active" class to selected tab$(".tab_content").hide(); //Hide all tab contentvar activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content$(activeTab).fadeIn(); //Fade in the active ID contentreturn false;});}();  var replaceContactBox = function () {$("#contact-box-left").html("");$("#contact-box-left").append("<map name='phone'> <area shape='rect' coords='0,55, 145, 78' href='mailto:info@ggzgroep.nl' alt='mail to ggzgroep.nl' title='mail naar info@ggzgroep.nl'/> </map> "); $("#contact-box-left").append("<img src='/images/phone_menu.gif' alt='phone ggz' usemap='#phone' width='145' height='125'/>"); }();  //smooth scrolling // var scrollElement = 'html, body';// $('html, body').each(function () {// var initScrollTop = $(this).attr('scrollTop');// $(this).attr('scrollTop', initScrollTop + 1);// if ($(this).attr('scrollTop') == initScrollTop + 1) {// scrollElement = this.nodeName.toLowerCase();// $(this).attr('scrollTop', initScrollTop);// return false;// }// }); // $("a[href^='#']").click(function(event) {// event.preventDefault(); // var $this = $(this), // target = this.hash, // $target = $(target); // $(scrollElement).stop().animate({ // 'scrollTop': $target.offset().top // }, 500, 'swing', function() { // window.location.hash = target;// }); // });});function initializeMap(lat,lng){var myOptions = {zoom: 16,center: new google.maps.LatLng(lat,lng),mapTypeId: google.maps.MapTypeId.ROADMAP}var map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);var image = 'http://www.ggzgroep.nl/images/popup_ggz.png';var myLatLng = new google.maps.LatLng(lat,lng);var beachMarker = new google.maps.Marker({position: myLatLng,map: map,icon: image});} 
