$(document).ready(function() {

	if(screen.width<=1440) {
		$('#strip').css({'background-position':'-80px 109px'});
	}
	if(screen.width<=1024) {
		$('#strip').css({'background-position':'-288px 109px'});
	}
	var wh = $(window).height();
        $('#bodydiv').height(wh);

	$('div#topmenu ul a:first').css({'border':'none'});
	initMenu(); // voor accordeonmenu
	
	var path=window.location.pathname;
	if(path.indexOf('index.php')!=-1) {
		var currentURL = unescape(path.replace('index.php',''));
	}else{
		var currentURL = unescape(path);
	}

	$('#menu li a').each(function(index, elm) {
                var currentREL = unescape($(this).attr('rel'));
		//alert("rel="+currentREL+" en path="+currentURL);
                $(this).removeClass('active');
		if(currentREL == currentURL) {
                        $(this).addClass('active');
			$(this).next().delay(10).slideToggle('normal');
			$(this).parents('#menu ul').delay(10).slideToggle('normal');
		}
	});

 


	if ( $.browser.msie) {
		if($.browser.version.indexOf("7")!=-1) {
			$('#strip').css({'background-image':'lmbinaries/stripbg.png'});
		}
	}

        $('ul#menu li:first').css({'border-top':'1px solid #444444'});


});


function initMenu() {
  $('#menu ul').hide();
/*  $('#menu li a').delay(2000).mouseover( function() {
      var checkElement = $(this).next();
      if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
        return false;
      }
      if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
        $('#menu ul:visible').delay(800).slideUp('normal');
        checkElement.delay(800).slideDown('normal');
        return false;
      }
    })
*/
}


