$(document).ready(function()
{
	//1024
	if(screen.width < 1024)
	{
		$('#page').css('marginLeft', '-49px');
		
		$('#footer').css('background', 'none');
	}
	
	//logos
	$('ul#logos').css('left', ((screen.width / 2) - 500)+'px');

	$('ul#logos li a').hover(function()
	{
		$(this).css('backgroundPosition', 'top left');
	}, function()
	{
		if($(this).attr('id') != 'logo_bungalowpark')
			$(this).css('backgroundPosition', 'bottom left');
	});
	
	//mouseover
	$('ul#leftnav li').hover(function()
	{
		$('#correctie').css('width', '550px');
		
		$(this).css('paddingRight', '20px').find('a.a').css('backgroundPosition', 'bottom left');
		
		var d = $(this).find('div.submenu');
		
		d.find('a').show();
		
		d.show().animate({width: '216px'}, 200);
		
		d.find('a').each(function()
		{
			$(this).animate({'marginLeft': '+=30px'}, 200)
			.animate({'marginLeft': '-=20px'}, 100)
			.animate({'marginLeft': '+=10px'}, 150)
			.animate({'marginLeft': '-=20px'}, 200)
		});
	
	}, function()
	{
		$('#correctie').css('width', 'auto');
		
		$(this).find('a').css('backgroundPosition', 'top left');
		
		var d = $(this).find('div.submenu');
		
		d.animate({width: '0px'}, 200).hide();
		
		d.find('a').hide();
	});
	
	//submenu mouseover
	$('div.submenu a.submenu_a').hover(function()
	{
		$(this).css('backgroundPosition', 'bottom left');
	}, function()
	{
		$(this).css('backgroundPosition', 'top left');
	});
});