function setExternalLinks()
{
	var anchors = document.body.getElementsByTagName('a')
	var thissite = window.location.host;
	if (thissite.indexOf('www.') >= 0)
	{
		thissite = thissite.split('.')[1]
	}
	else
	{
		thissite = thissite.split('.')[0]
	}
	for (var i = 0; i < anchors.length; i++)
	{
		if (anchors[i].href.indexOf(thissite) < 0 && anchors[i].href.indexOf('javascript:') < 0)
		{
			anchors[i].target = '_blank';
		}
	}
}

var WF = {};
WF.Homepage = (function($)
{

	function setupSlideshows()
	{
		$('a.image-group').each(function(i)
		{
			var slideshow = new imageslideshowEngine();
			slideshow.images = $(this).find('img').get();
			slideshow.init(5000, 750);
		});
	}

	return { setupSlideshows: setupSlideshows };

})(jQuery);


jQuery(document).ready(WF.Homepage.setupSlideshows);