function showcredit( id )
{
	$('#photocredit').html("&copy; " +  id );
}


$(document).ready(function() {
	// Animatie homepage
	$('#homeslides').jqFancyTransitions({ delay: 5000, width: 1500, height: 761, strips: 4, stripDelay: 200});
	
	// Menu mouseovers
	$('#mainnav ul').hide();
	$('#mainnav li').hover(function(){$('ul',this).fadeIn(50);},function(){$('ul',this).fadeOut(500);});
	

	// Ruimte maken
	if ( $('#titlelayer>h2').width() > 12 )
	{
		/*
		var pos = 50 + $('#titlelayer>h2').width();
		
		if ( $('.holderproject').length != 0 )
		{
			if ( $('.holderproject').offset().left  < pos)
			{
				$('.holderproject').css({'margin-left' : pos  + 'px'});
			}
		}
		
		if ( $('.holder').length != 0 )
		{
			if ( $('.holder').offset().left < pos)
			{
				$('.holder').css({'margin-left' : pos  + 'px'});
			}
		}	
		if ( $('.smallholderproject').length != 0 )
		{
			if ( $('.smallholderproject').offset().left < pos)
			{
				$('.smallholderproject').css({'margin-left' : pos  + 'px'});
			}
		}	
		*/
	}
	if ( ( $(window).height() - $('#titlelayer').height() ) < 460  )
	{
		$('.mplist').hide();
		$('#activiteiten').hover(function(){$('.mplist').show();},function(){$('.mplist').hide();});
	}
	
	if ($('#tweet').length != 0)
	{
		var html = "<ul>";
		var tweeturl = "http://twitter.com/status/user_timeline/theateradviesbv.json?callback=?"
		
		var jqxhr = $.getJSON(tweeturl, { count: "3"}, function(d) {
	  		
	  		$.each(d, function(i, item) {
	            html += "<a href='http://twitter.com/#!/theateradviesbv/status/" + item.id +"'>" + item.text + "</a>";
	        });
	  		
	  		html += "</ul>";
			$('#tweet').html(html);
		})
	}


});

