var sSlideshowSpeed = 'slow';
var iSlideshowTimeout = 2500;

$(document).ready(function() {
	$('ul.listItems li').hover(
		function() {
			$(this).addClass('current');
		}, 
		function() {
			$(this).removeClass('current');
		}).click(function() {
			sHref = $(this).find('a').attr('href');
			window.location.href = sHref;
		});
	$('div.slideshowContainer').innerfade({
		timeout: iSlideshowTimeout,
		speed: sSlideshowSpeed
	});
	$('div.sidebarSlideshowContainer').each(function()
	{
		var iMaxHeight = 0;
		$(this).children('.sidebarBlockImage').each(function()
		{
			iFoo = parseInt($(this).height());
			if (iFoo > iMaxHeight)
			{
				iMaxHeight = iFoo;
			}
		});
		$(this).innerfade({
			containerheight: iMaxHeight+'px',
			timeout: iSlideshowTimeout,
			speed: sSlideshowSpeed
		});
	});
	$('p.formItem .textinput').focus(function() { $(this).addClass('current'); }).blur(function() { $(this).removeClass('current');});
});

