			jQuery.preloadImages = function()
			{
			  for(var i = 0; i<arguments.length; i++)
			  {
			    jQuery("<img>").attr("src", arguments[i]);
			  }
			}
			var msie6 = $.browser.msie && parseInt($.browser.version) == 6;
			var msie8 = $.browser.msie && parseInt($.browser.version) == 8;
			$(document).ready(function() {
				var link = document.createElement('link');
				link.type = "text/css";
				link.href = "/css/connect/secondary/jquery.checkbox.css";
				link.rel = "stylesheet";
				document.getElementsByTagName('head')[0].appendChild(link);

				$('#search-clause').bind('focus', function() {
					if ($(this).hasClass('empty'))
					{
						this.value = '';
					}
				});
				$('#search-clause').bind('keypress', function() {
					if ($(this).hasClass('empty'))
					{
						$(this).removeClass('empty');
						$(this).addClass('filled');
					}
				});
				$('#search-clause').bind('blur', function() {
					if ($(this).hasClass('empty'))
					{
						this.value = 'new search...';
					}
				});

				$('input:radio').checkbox();
				$(':checked + * + label').css('color','#ffffff');
				$('span.jquery-checkbox, span.jquery-checkbox img,label').bind('click', function() {
					$('#search-form label').css('color','#757575');
					if (this.tagName == 'LABEL') $(this).css('color','#ffffff');
					else if (this.tagName == 'SPAN') this.nextSibling.style.color = '#ffffff';
					else  this.parentNode.parentNode.nextSibling.style.color = '#757575';
				});

				$('span.jquery-checkbox').focus(function() {
					$(this).className = 'jquery-checkbox-hover';
				});

				$('#search-form input:radio').focus(function(e) {
					var el = e.target;
					$(el.nextSibling.nextSibling).click();
				});
				$.preloadImages("images/topics_more_over.jpg");
				if ($.browser.safari)
				{
					var link2 = document.createElement('link');
					link2.type = "text/css";
					link2.href = "/css/connect/secondary/safari.css";
					link2.rel = "stylesheet";
					document.getElementsByTagName('head')[0].appendChild(link2);
				}
			});
			$(window).load(function() {
				var pos = $('#featured-main').position();
				var h = $('#featured-main').height();

				document.getElementById('topics').style.top = (pos.top + h + 30) + 'px';

				//if (!msie6 && !msie8)
				//	$('div.shaded').dropShadow( { top: 1, left: 1 });
			});
