// Contains all Javascript to be executed on pageload

jQuery.noConflict();

jQuery(document).ready(function() {
	// Informs IE/Mac users to GET A NEW BROWSER (If using IE/Mac && it's your first time viewing a page on this site)
	if ((navigator.appName.indexOf('Internet Explorer') > -1 && navigator.appVersion.indexOf('Mac') > -1) && document.referrer.indexOf(location.hostname) == -1) {
		alert("You are using an out of date browser and as such, this site may not display correctly.\n\nWe recommend you download a newer browser such as Firefox (www.mozilla.com) and use that.");
	}

	// 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
	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';
				var url = links[i].href;
				links[i].href = "javascript:window.open('" + url + "'); void 0;";
			}
		}
	}

	if(jQuery('#photos')) {
		jQuery('#photos').innerfade({
			animationtype: 'fade',
			speed: 'slow',
			// timeout: 2000,
			// type: 'sequence',
			timeout: 10000,
			type: 'random',
			containerheight: '300px',
			runningclass: 'innerfade'
		});
	}
});
	