if(jQuery.browser.safari && parseInt(jQuery.browser.version)<419)
	var browsersucks=true;

$(document).ready(function() {
 	closeContent();
	thumbnails();
});

function closeContent() {
	$('.close').click(function() {
		$('#content').hide();
		$('#slogan').css('background-position','bottom center');
		return false;
	});
}

function slideShow(element) {
	timer = window.setInterval(function() {
		if($(element).children('img:visible:eq(0)').prev().size()>0) {
			$(element).children('img:visible:eq(0)').prev().show();
			$(element).children('img:visible:eq(1)').fadeOut(1000);
		}
		else {
			$(element).children('img:last').fadeIn(1000, function() {
				$(element).children('img:visible').not(':last').fadeOut(1000);
			});
		}
	}, 6500);
}

function thumbnails() {
	$('.thumbnails a').click(function() {
		window.clearTimeout(timer);
		$('#bg img:visible').fadeOut(1000);
		$('#bg img[src$='+$(this).attr('href')+']').fadeIn(1000);
		return false;
	});
}
