$( function() {
	var timeout;

	if($.browser.msie == true && $.browser.version <= 6) {

		$("#topnav ul li").hover( function() {

			clearTimeout(timeout);

			if($(this).find('ul').length > 0) {

				$(this).addClass('hover');

				var thisclass = $(this).find('ul').attr('class');
				$(this).parent().find('ul[class!='+ thisclass +']').hide();

				$(this).find('a:first').addClass('hover');
				$(this).find('ul').show();

			};

		}, function() {

			$(this).find('a:first').removeClass('hover');

			clearTimeout(timeout);
			timeout = setTimeout("$('#topnav ul li ul').hide(); ", 350);

		});

	};


	$('#topnav form #q').focus( function() {

		$(this).addClass('focus');

	}).blur( function() {

		if($(this).val().length == 0) {
			$(this).removeClass('focus');
		};

	});

});