// Contains all Javascript to be executed on pageload

// jQuery.noConflict();

// jQuery(document).ready(function() {
	window.onload = function() 
	{
		// Informs IE/Mac, Netscape 7.x, and Mozilla users to get a new browser (If using culprit browser && it's your first time viewing a page on this site)
		if (((navigator.appName.indexOf('Internet Explorer') > -1	&& navigator.appVersion.indexOf('Mac') > -1) || (navigator.userAgent.indexOf('Netscape/7') > -1) || (navigator.userAgent.indexOf('Mozilla') > -1 && navigator.userAgent.indexOf('rv:1.7') > -1)) && document.referrer.indexOf(location.hostname) == -1) 
		{
			alert("You are using an out-of-date web browser which may make this site not display or function correctly.\n\nWe recommend you upgrade or download a newer browser such as:\n\nFirefox (www.getfirefox.com)\nSeaMonkey (www.mozilla.org/projects/seamonkey/)");
		}

		// Sets all <a> tags with rel="external" or rel="newpage" to open in a new window
		// Target attribute is not valid in Strict doctype... so we dynamically add it ;-)
		// Planned to evolve into a window.open() call
		// patch <db> :: resolving jquery conflicts
		var links = $('a');//.merge($('area'));
		if(links.length > 0) {
			for (i = 0 ; i < links.length ; i++) {
				if(links[i].rel && (links[i].rel == "external" || links[i].rel == "newpage") || links[i].className.indexOf('offsite') > -1) {
					//links[i].target = '_blank';
					links[i].title = 'This link opens in a new window.'
					links[i].href = "javascript:window.open('" + links[i].href + "'); void 0;";
				}
			}
		}

		// Handles flyouts on IE6
		if(document.all) {
			sfHover('mainnav', 'li');
		}
	}
// );
