$(document).ready(function() {	
	$('.HomeContentItem.odd').click(function(){
		if($(this).hasClass('open')){
			return;
		}
		$(this).children('.slideodd').toggleClass("uitgeklapt");
		
		if($(this).children('.slideodd').hasClass('uitgeklapt')){
			$(this).children('ul').slideToggle(200, function() {		
				//BannerHeightFix
				var a=$(this).parent('li').children('ul').height();
				var b=$('#Right').height();
				var maxHeight= a + b;
				$('#Right').css('height',maxHeight);
			});
		}
		else{
			$(this).children('ul').slideToggle(200, function() {		
				//BannerHeightFix
				var a=$(this).parent('li').children('ul').height();
				var b=$('#Right').height();
				var maxHeight= b - a;
				$('#Right').css('height',maxHeight);
			});
		}
	});
	
	$('.HomeContentItem.even').click(function(){
		if($(this).hasClass('open')){
			return;
		}
		$(this).children('.slideeven').toggleClass("uitgeklapt");
		
		if($(this).children('.slideeven').hasClass('uitgeklapt')){
			$(this).children('ul').slideToggle(200, function() {		
				//BannerHeightFix
				var a=$(this).parent('li').children('ul').height();
				var b=$('#Right').height();
				var maxHeight= a + b;
				$('#Right').css('height',maxHeight);
			});
		}
		else{
			$(this).children('ul').slideToggle(200, function() {		
				//BannerHeightFix
				var a=$(this).parent('li').children('ul').height();
				var b=$('#Right').height();
				var maxHeight= b - a;
				$('#Right').css('height',maxHeight);
			});
		}
	});
	
	$('.HomeContentItem ul.HomeContentChildren').hover(function(){
		$(this).parent('.HomeContentItem').addClass('open');
	},function(){
		$(this).parent('.HomeContentItem').removeClass('open');
	});
	
	$('.RightColumnBannersListItem a:[onclick!=__utmSetVar]').each(function(index) {
	//	$(this).removeAttr( 'onclick' );
		var title=$(this).attr('title');
		$(this).attr('onclick','__utmSetVar(\'/banner/'+title+'\');');
		
	});	
		
});