$(document).ready(function() {
	$('.menu_home, #ddm_home').bind('mouseenter mouseleave', function() {
		$('.menu_home').toggleClass('menu_home_hover');
	});
	$('.menu_overons, #ddm_overons').bind('mouseenter mouseleave', function() {
		$('.menu_overons').toggleClass('menu_overons_hover');
	});
	$('.menu_cursusinfo, #ddm_cursusinfo').bind('mouseenter mouseleave', function() {
		$('.menu_cursusinfo').toggleClass('menu_cursusinfo_hover');
	});
	$('.menu_inschrijving, #ddm_inschrijving').bind('mouseenter mouseleave', function() {
		$('.menu_inschrijving').toggleClass('menu_inschrijving_hover');
	});
	$('.menu_agenda, #ddm_agenda').bind('mouseenter mouseleave', function() {
		$('.menu_agenda').toggleClass('menu_agenda_hover');
	});
	$('.menu_fotos, #ddm_fotos').bind('mouseenter mouseleave', function() {
		$('.menu_fotos').toggleClass('menu_fotos_hover');
	});
	$('.menu_feestenenpartijen, #ddm_feestenenpartijen').bind('mouseenter mouseleave', function() {
		$('.menu_feestenenpartijen').toggleClass('menu_feestenenpartijen_hover');
	});
	$('.menu_nieuws, #ddm_nieuws').bind('mouseenter mouseleave', function() {
		$('.menu_nieuws').toggleClass('menu_nieuws_hover');
	});
	$('.menu_contact, #ddm_contact').bind('mouseenter mouseleave', function() {
		$('.menu_contact').toggleClass('menu_contact_hover');
	});
	
	
	$('.menu_home').bind('mouseenter', function() {
		if ($('#ddm_home').css('display') == 'none') {
			$('#ddm_home').fadeIn("normal");
		}
	});
	$('.menu_home').bind('mouseleave', function() {
		$('#ddm_home').hide();
	});
	
	$('.menu_overons').bind('mouseenter', function() {
		if ($('#ddm_overons').css('display') == 'none') {
			$('#ddm_overons').fadeIn("normal");
		}
	});
	$('.menu_overons').bind('mouseleave', function() {
		$('#ddm_overons').hide();
	});
	
	$('.menu_cursusinfo').bind('mouseenter', function() {
		if ($('#ddm_cursusinfo').css('display') == 'none') {
			$('#ddm_cursusinfo').fadeIn("normal");
		}
	});
	$('.menu_cursusinfo').bind('mouseleave', function() {
		$('#ddm_cursusinfo').hide();
	});
	
	$('.menu_inschrijving').bind('mouseenter', function() {
		if ($('#ddm_inschrijving').css('display') == 'none') {
			$('#ddm_inschrijving').fadeIn("normal");
		}
	});
	$('.menu_inschrijving').bind('mouseleave', function() {
		$('#ddm_inschrijving').hide();
	});
	
	$('.menu_agenda').bind('mouseenter', function() {
		if ($('#ddm_agenda').css('display') == 'none') {
			$('#ddm_agenda').fadeIn("normal");
		}
	});
	$('.menu_agenda').bind('mouseleave', function() {
		$('#ddm_agenda').hide();
	});
	
	$('.menu_fotos').bind('mouseenter', function() {
		if ($('#ddm_fotos').css('display') == 'none') {
			$('#ddm_fotos').fadeIn("normal");
		}
	});
	$('.menu_fotos').bind('mouseleave', function() {
		$('#ddm_fotos').hide();
	});
	
	$('.menu_feestenenpartijen').bind('mouseenter', function() {
		if ($('#ddm_feestenenpartijen').css('display') == 'none') {
			$('#ddm_feestenenpartijen').fadeIn("normal");
		}
	});
	$('.menu_feestenenpartijen').bind('mouseleave', function() {
		$('#ddm_feestenenpartijen').hide();
	});
	
	$('.menu_nieuws').bind('mouseenter', function() {
		if ($('#ddm_nieuws').css('display') == 'none') {
			$('#ddm_nieuws').fadeIn("normal");
		}
	});
	$('.menu_nieuws').bind('mouseleave', function() {
		$('#ddm_nieuws').hide();
	});
	
	$('.menu_contact').bind('mouseenter', function() {
		if ($('#ddm_contact').css('display') == 'none') {
			$('#ddm_contact').fadeIn("normal");
		}
	});
	$('.menu_contact').bind('mouseleave', function() {
		$('#ddm_contact').hide();
	});
	
	$('.ly_dropdown_menu').bind('mouseenter mouseleave', function() {
		if ($(this).css('display') == 'none') {
			$(this).show();
		} else {
			$(this).hide();
		}
	});
	
	$('img.order_up')
		.bind('mouseenter',	function() {this.src = 'img/icons/arrow_up_hover_10.png';})
		.bind('mouseleave',	function() {this.src = 'img/icons/arrow_up_10.png';})
		.bind('click',		function() {
			id = $(this).attr('id');
			id = id.split('_');
			
			document.location.href = 'page_order.php?a=up&id=' + (id[id.length-1]);
			return false;
		});
	$('img.order_down')
		.bind('mouseenter', function() {this.src = 'img/icons/arrow_down_hover_10.png';	})
		.bind('mouseleave', function() {this.src = 'img/icons/arrow_down_10.png';})
		.bind('click',		function() {
			id = $(this).attr('id');
			id = id.split('_');
			
			document.location.href = 'page_order.php?a=down&id=' + (id[id.length-1]);
			return false;
		});
});
