function roundCornersSpan(elem, tl, tr, bl, br)
{
	tl = tl || 'y';
	tr = tr || 'y';
	bl = bl || 'y';
	br = br || 'y';

	if(tl == 'y') $(elem).append('<span class="rc tl"></span>');
	if(tr == 'y') $(elem).append('<span class="rc tr"></span>');
	if(bl == 'y') $(elem).append('<span class="rc bl"></span>');
	if(br == 'y') $(elem).append('<span class="rc br"></span>');
}


$(document).ready(function(){
	roundCornersSpan('#whereami', 'y', 'n', 'y', 'n');
	roundCornersSpan('form');
	roundCornersSpan('#startevent a span.date', 'y', 'y', 'n', 'n');
	roundCornersSpan('#startevent a span.date em', 'y', 'y', 'n', 'n');

	$('body').append('<div id="menurip"></div>');
	$('body').append('<div id="topboxrip"></div>');

	$('#menu a').hover(function() {
		$(this).fadeOut(200, function() {
			$(this).fadeIn(300);
		});
	}, function() {
		return false;
	});

	$('a.img').hover(function() {
		$(this).children('span').css('display','none');
		$(this).children('span').slideDown(300);
	}, function() {
		$(this).children('span').fadeOut(200, function() {
			return false;
		});
	});

	$('a.lightbox').hover(function() {
		$(this).children('span').css('display','none');
		$(this).children('span').slideDown(300);
	}, function() {
		$(this).children('span').fadeOut(200, function() {
			return false;
		});
	});

	var $bboxes = $('div.bbox div');
	for(var i = 0; i < $bboxes.length; i++)
	{
		if($bboxes[i].offsetHeight < 122) $bboxes[i].style.height = '122px';
	}
});
