
$(document).ready(function(){

	//site onderdelen weergeven
		$('#box').fadeIn(800);
		
	//---------------------------  INSTELLINGEN VOOR DE MODALWINDOW ---------------------------	
		//Examples of how to assign the ColorBox event to elements
		$("a[rel='shoutbox']").colorbox({transition:"fade", slideshow:false});
		$("a[rel='modalwindow']").colorbox({transition:"fade", slideshow:false});
		$("a[rel='slideshow']").colorbox({slideshow:true});
		
		
	$(function(){
		$('.tekengrootte').click(function(){
			var ourText = $('div#content');
			var currFontSize = ourText.css('fontSize');
			var finalNum = parseFloat(currFontSize, 10);
			var stringEnding = currFontSize.slice(-2);
			if(this.id == 'large') {
				finalNum *= 1.2;
			}
			else if (this.id == 'small'){
				finalNum /=1.2;
			}
			ourText.animate({fontSize: finalNum + stringEnding},600);
		});
	});

});


$(document).ready( function() 
{
	// DOUBLE CLICK FIX 
	$('#slidePager').click(function(){
		$(this).parents('li').removeAttr('onclick');
	});
	
	$('#slideImages ol').cycle({
		fx:     'fade',
		speed:   500, 									// speed of the transition (any valid fx speed value)
		timeout: 4000, 									// milliseconds between slide transitions (0 to disable auto advance) 
		pause:   1, 									// true to enable "pause on hover" 
		pager: 	'#slidePager', 							// id of element to use as pager container 
		pagerAnchorBuilder: function(idx, slide) 
		{
		return '#slidePager li:eq(' + idx + ')';		// return selector string for existing anchor 
		}
	});
});




// ---------------------- FORM SUBMIT FUNCTION --------------------------------------------------------
function submit_form (form_id, submit_to, callback)
{
	var data = $('#' + form_id).serialize();
	$('#'+callback).load(submit_to + '&' + data);
}


// ---------------------- LAAT DE LAATSTE 10  TWEETS---------------------------------------------------
function load_tweets()
{
	new TWTR.Widget({
	version: 2,
	type: 'profile',
	rpp: 10,
	interval: 4000,
	width: 'auto',
	height: 525,
	theme: {
	shell: {
	  background: '#ffffff',
	  color: '#3A3A3B'
	},
	tweets: {
	  background: '#ffffff',
	  color: '#4d4d4d',
	  links: '#00aaff'
	}
	},
	features: {
	scrollbar: false,
	loop: false,
	live: true,
	hashtags: false,
	timestamp: true,
	avatars: true,
	behavior: 'all'
	}
	}).render().setUser('bas_bakker').start();
}

