$(document).ready(function(){  
	

	$('#animatie').innerfade({
		animationtype: 'fade',
		speed: 600,
		timeout: 8000,
		type: 'random_start',
		containerheight: '400px'
	});
	
	$('img').each(function(){
		if(this.parentNode.tagName.toLowerCase() != 'a' && this.src.indexOf("_th")!= -1){
			var src = this.src;
			var title = this.alt;
			var width = this.width;
			var height = this.height;
			var className = this.className;
			var href = this.src.replace('_th','');

			var a = $("<a/>")
				.insertAfter(this)
				.attr({
						'href' : href,
						'title' : title
						})
				.html('<img/>')				
				.find('img')
				.attr({
						'src' : src,
						'class' : className,
						'width' : width,
						'height' : height,
						'title' : title
					});
			$(this).remove();
		}
	});
										
									
	if(top.location == location){
		$("#content").yoxview({
			lang: "nl",
			backgroundColor: "#454545",
			playDelay: "2000"
		});
	}
	
	
});


