
// slide the content to the given item
var iv = '';
function slide(item) {
	switch(item) {
		case 'twitter':
			// show twitter qr code
			$('#content').animate({ top: '-775' }, {queue:false, duration:1200}, 'easeOutElastic');
			// switch site color
			$("A").animate({ color: '' + col_3, duration: 625 });
			break;
		case 'email':
			// show email qr code
			$('#content').animate({ top: '-375' }, {queue:false, duration:1200}, 'easeOutElastic');
			// switch site color
			$("A").animate({ color: '' + col_2, duration: 625 });
			break;
		case 'mobile':
			// show mobile qr code
			$('#content').animate({ top: '25' }, {queue:false, duration:1200}, 'easeOutElastic');
			// switch site color
			$("A").animate({ color: '' + col_1, duration: 625 });
			break;
		case 'home':
			// show logo
			$('#content').animate({ top: '-1200' }, {queue:false, duration:1200}, 'easeOutElastic');
			// switch site color
			$("A").animate({ color: '' + col_0, duration: 625 });
			break;
		case 'magic':
			// show logo
			$('#content').animate({ top: '-1600' }, {queue:false, duration:1200}, 'easeOutElastic');
			// switch site color
			$("A").animate({ color: '' + col_4, duration: 625 });
			break;
		default:
			// nothing
	}
}

// switch the word
var a = new Array('websites','webshops','databases','web apps','mobile websites','web-to-print','print','qr codes','purls','content management','photography','');
var sw = '';
var id = -1;
function loop_words() {
	id++;
	$('#activities').fadeOut('fast',function() {
		$('#activities').html('' + a[id]);
		$('#activities').fadeIn('slow');
	});
	if (id == a.length) { id = 0; }
}

function start_site() {
	$('#logo_mark').fadeOut(1500);
	$('#links').fadeIn(1500);
	$('#content').fadeIn(1500,function() {
		ld = setInterval(loop_words, 1000);
	});
}

$(document).ready(function() {
	setTimeout(start_site,1750);
});
