//////////////////////////////////////////////////////////////////////
//

$(document).ready(function()
{
	$('#keyword').click(function()
	{
		$(this).val('');
	});
	
	$('#keyword').blur(function()
	{
		$(this).val($(this).val()?$(this).val():'Rechercher une video_');
	});
	
	
	$('#search-webtv #submit').attr('src', 'http://tv.artisanat.info/images/vide.gif');
	
	$('#selector_1000').click(function()
	{
		if ($(this).hasClass('opened'))
		{
			$('#list_1000').slideUp('slow', null);
			$('#selector_1000').removeClass('opened');
		}
		else
		{
			if ($('#selector_1001').hasClass('opened'))
			{
				$('#list_1000').fadeIn('slow', null);
				$('#list_1001').css('display', 'none');
			}
			else
			{
				$('#list_1000').slideDown('slow', null);
				$('#list_1001').slideUp('slow', null);
			}
			
			$('#selector_1000').addClass('opened');
			$('#selector_1001').removeClass('opened');
		}
	});
	
	
	$('#selector_1001').click(function()
	{
		if ($(this).hasClass('opened'))
		{
			$('#list_1001').slideUp('slow', null);
			$('#selector_1001').removeClass('opened');
		}
		else
		{
			if ($('#selector_1000').hasClass('opened'))
			{
				$('#list_1001').fadeIn('slow', null);
				$('#list_1000').css('display', 'none');
			}
			else
			{
				$('#list_1001').slideDown('slow', null);
				$('#list_1000').slideUp('slow', null);
			}
			
			$('#selector_1001').addClass('opened');
			$('#selector_1000').removeClass('opened');
		}
	});
		
	$('#list_1000 .closer').click(function()
	{
		$('#list_1000').slideUp('slow', null);
		$('#selector_1000').removeClass('opened');
		return false;
	});
	
	$('#list_1001 .closer').click(function()
	{
		$('#list_1001').slideUp('slow', null);
		$('#selector_1001').removeClass('opened');
		return false;
	});
	

/*
	$('#list_1000').mouseover(function()
	{
		$('#list_1000').slideToggle('slow', null);
	});
	$('#selector_1000').mouseout(function()
	{
		$('#list_1000').slideToggle('slow', null);
	});
	$('#selector_1001').mouseout(function()
	{
		$('#list_1001').slideToggle('slow', null);
	});
	*/
});

