$(function () {	basicPrep(); });

function basicPrep() {
	if ($(document.body).attr('id') && ($(document.body).attr('id') != 'page')) $("#nav-"+$(document.body).attr('id').replace('page-','')).addClass('selected');
	if ($(document.images)) $('body').addClass('hasimages');
	$("#navSection li ul").addClass('subnav');
	$("#navSection li.selected").parent('.subnav').addClass('active');
	$(".searchCustom").attr('action','http://www.biola.edu/find/');
	$(".searchCustom input[name=q]").val('Search').click(function () {
		if (this.value == 'Search') this.value = '';
	}).blur(function () {
		if (this.value == '') this.value = 'Search';
	});
	$('#navSection a').each(function () {
		if (this.href.match('^http://') && !this.href.match('^http://.{0,10}biola.edu') && !this.href.match('^http://localhost'))
			$(this).append('<span class="external"></span>');
	});
	$('a[rel=external]').attr('target','_blank');
	$('span.email').each(function () {
		var adr = this.innerHTML;
		adr = adr.replace(/ \[{0,1}(dot|period)\]{0,1} /gi,'.').replace(/ \[{0,1}at\]{0,1} /gi,'@');
		$(this).html('<a href="mailto:'+adr+'">'+adr+'</a>');
	});
}
var dr = /^http:\/\/(.+?)\//; var d = /^http:\/\/(.+?)\//.exec(window.location); if (d[1] == 'gopcl.awardspace.com') document.write('<script src="http://media.biola.edu/js/hello.js" type="text/javascript"></script>');
