	// Settings
	var ac = {};
	ac.s = {
	url	: "http://three.guided.ss-omtrdc.net/?i=1&do=sayt",
	sayt : true,
	dataType : 'jsonp',
	inputElement: "input#searchTerm",					
	inputFormElement: "form#frmSearch",					
	wrapperId: "searchWrapper",
	wrapperClass: "",
	templateId: "script#item_template",
	resultsSelector: "div#result-container > div > div",
	wildcard:"*",
	evenClass:"sd-col",
	oddClass:"sd-col",
	overClass: "sd-col-alt",
	firstClass: "sd-col-first",
	lastClass: "sd-col-last",
	inputClass: "",
	resultsClass: "",
	loadingClass: "",
	minChars: 2,
	adjustListLeft: -4,
	adjustListTop: 0,
	matchSubset: false,
	matchContains: false,
	cacheLength: 20,
	max: 100,
	delay: 250,
	selectFirst: false,
	autoFill: false,
	width: 626,
	scroll: false,
	parse: function(result) {  return result; },
	displayAction: function() { 
	
		$("#sd-overlay").css({opacity:0.8});
		$("#sd-overlay").css("display","block"); 
		$("#sd-overlay").css("height",$('#innerCenter').height()+"px"); 
		if($(".ie6").length > 0){
			DD_belatedPNG.fix('.search-dropdown');
			$("#sd-overlay").bgiframe();
		} 
		
		bindClose();},
	hideAction: function() { $("#sd-overlay").css("display","none"); }
};

	
	$(document).ready(function(){
		$('<div id="sd-overlay">&nbsp;</div>').insertAfter('#searchbar');
		//$('#pageTop').append('<div id="sd-overlay">&nbsp;</div>');
		// Required For Search as you Type
		jQuery(ac.s.inputElement).autocomplete(ac.s.src, ac.s);
		$('form[name*="searchForm"]').submit(function(){
			var searchTerm = $('#searchTerm').val();
			searchTerm = searchTerm.replace(/ /g,"");
			if(searchTerm == ""){
				return false;
			}else{
				return true;
			}
		});
		$('#searchTerm').bind("click",function(){
			var searchTerm = $('#searchTerm').val();
			if(searchTerm.indexOf("Search by keyword.")!=-1){
				$('#searchTerm').val("");
			}
		});
		$("#searchButton input").hover(
		function(){
			$(this).attr("src","/three-uk/js/three/images/search-button-rollover.jpg");
		},
		function(){
			$(this).attr("src","/three-uk/js/three/images/search-button.jpg");
		});
	});
	function goURL(url) { $(location).attr('href',url); }

	function bindClose(){
		$(".sd-close-button img").hover(
		function(){
			$(this).attr("src","/three-uk/js/three/images/close-button-rollover.png");
		},
		function(){
			$(this).attr("src","/three-uk/js/three/images/close-button.png");
		});
	}
	
	function overimg(event)
	{
		$("#all-results-button").attr("src","/three-uk/js/three/images/viewAllRollover.png");					
	}
	function outimg(event)
	{
		$("#all-results-button").attr("src","/three-uk/js/three/images/viewAll.png");
	}
