$(document).ready(function()
{
	var mouse_on = null;
	var close = true;

	$('#checkall').change(function(evt)
	{
		var checked = $(this).attr('checked');

		if (checked) {
			$('.comm_checkbox').each(function(i){
				$(this).attr('checked', 'checked');
			});
		}
		else
		{
			$('.comm_checkbox').each(function(i){
				$(this).removeAttr('checked');
			});
		}
	});

	$('.delete').click(function()
	{
		return confirm('Remove ' + $(this).attr('name') + ' from favorites?');
	});

	$("#filterby").mouseover(function(event)
	{
		if (close) {
			$("#filterby_pop").show('fast');
		}
	});


	$("#filterby").mouseout(function(event)
	{
		mouse_on = setTimeout('$("#filterby_pop").hide("fast"); close = true;', 500);
	});


	$("#filterby").mousemove(function(event)
	{
		if (mouse_on) {
			clearTimeout(mouse_on);
			mouse_on = null;
		}
	});


});
