$(document).ready(function(){ 
						   
	/* font sizer */						   
	fontResizer('100%','120%','140%');

	/* stop double line on sub nav */
	$("#nav li:last").addClass("no-line");
	
	/* remove separator*/
	$("#head-links ul li:last").addClass("no-line");
	$("#news-list ul li:last").addClass("no-line");
	
	/* Round corners
	$("div.box-inner").corner().parent().css('padding', '1px').corner(); */
	
	/* fix png trans in IE6 */
	$(document).pngFix(); 
		
	$('#txtSearch').keyup(function(e) {
		//alert(e.keyCode);
		if(e.keyCode == 13) {
			siteSearch();
		}
	})
	
	/* search */
	$("#site-search").click(function(){  
		siteSearch();
	}); 
}); 

function siteSearch() {
	
	alert('Site search needs to be configured');
	return;
	
	srch = $("#txtSearch").val();
	srch = srch.replace(/^\s+|\s+$/g,'');
	srch = srch.replace("   ", " ");
	srch = srch.replace("  ", " ");
	
	defVal = document.getElementById('txtSearch').defaultValue;
	
	if(srch != '' && srch != defVal)
	{
		srch = srch.replace(" ", "+");
		searchString = 'http://www.google.co.uk/search?q=site%3Ahttp%3A%2F%2Fwww.stthomasschooliow.co.uk+' + 
			srch + 
			'&ie=utf-8&oe=utf-8&aq=t&meta=cr%3DcountryUK|countryGB';
		window.open(searchString,'Search Results')
	}	
	
	var txtSrch = document.getElementById('txtSearch');
	txtSrch.value = defVal;
}

/* Clear a text box if the value is the default value */
function clearBox(box) {
    if (box.value == box.defaultValue) {
        box.value = "";
    }
}

/* Set a text box back to the default value if the value is blank */
function resetBlankBox(box) {
    if (box.value == "") {
        box.value = box.defaultValue;
    }
}

