$().ready(function() {
	applyDefaultValue(document.getElementById('WakefieldSearchForm_SearchForm_Search'), 'SEARCH');
	
	
	if ($.browser.msie && $.browser.version.substr(0,1)<7) {
	} else {
		var shadowSettings = {
			"color": "#000000"
		};
	
	
		$('#MainMenu li.current span.topLevel').dropShadow(shadowSettings);
		$('#MainMenu li a.topLevel ').dropShadow(shadowSettings);
	//	$('#MainMenu ul').dropShadow(shadowSettings);


		
		
		//$('#MainMenu li.current span.topLevel').dropShadow(shadowSettings);
		$('#MainMenu li.topLevel').hover(function() {
			$('ul', this).dropShadow(shadowSettings);
		}, function() {
			$('ul', this).removeShadow().blur();
		});
	}

});






function applyDefaultValue(elem, val) {
//	elem.style.color = '#777';
	
		if(elem.value == '') {
		//	this.style.color = '#777';
			elem.value = val;
		}
	
	elem.onfocus = function() {
		if(this.value == val) {
		//	this.style.color = '';
			this.value = '';
		}
	}
	elem.onblur = function() {
		if(this.value == '') {
		//	this.style.color = '#777';
			this.value = val;
		}
	}
}

sfHover = function() {
	var sfEls = document.getElementById('MainMenu').getElementsByTagName('LI');
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" hover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" hover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
