// JavaScript Document
$(function() {
    $('#foto').cycle({ 
    fx:    'fade', 
    speed:    600, 
    timeout:  4000, 
	random:  1, 
	cleartype:  1,
	pause:  1   
});
});

$(function() {
    $('#nieuws').cycle({ 
    fx:    'fade', 
   speed:    600, 
    timeout:  5000, 
	random:  1, 
	cleartype:  1,
	pause:  1   
});
});

$(function() {
    $('#twitter').cycle({ 
    fx: 'scrollDown',
    speed:    300, 
    timeout:  5000, 
	random:  1, 
	cleartype:  1,
	pause:  1   
});
});

$( function(){
    $.Tooltip.defaults = $.extend( $.Tooltip.defaults, {
        delay      : 10,
        showURL    : false,
        showBody   : " - ",
        track      : true
    });
    $( 'a' ).Tooltip();
	$( 'img' ).Tooltip();

});
    
	function client_data(info)
{
	if (info == 'width')
	{
		width_height_html = '<strong>Scherm Resolutie:</strong></br><span class="browser2">';
		width = (screen.width) ? screen.width:'';
		height = (screen.height) ? screen.height:'';
		width_height_html += '' + width + " x " +
			height + "";
		(width && height) ? document.write(width_height_html):'';
		document.write ("</span>");
	}
}


function blockError(){return true;}
window.onerror = blockError;
function nrcIE(){
if (document.all){return false;}}
function nrcNS(e){
if(document.layers||(document.getElementById&&!document.all)){ 
if (e.which==2||e.which==3){
return false;}}} 
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=nrcNS;
}else{document.onmouseup=nrcNS;document.oncontextmenu=nrcIE;}
document.oncontextmenu=new Function("return false");


var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
win.focus();}


window.onload = function() {
  document.onselectstart = function() {return false;} // ie
  document.onmousedown = function() {return false;} // mozilla
}



window.onload = function() {
  document.onselectstart = function () { return false; } // ie
  document.onmousedown = function () { return false; } // mozilla
}

window.onload = function() {
	function welkom() {
welkom =  [  "Bienvenue!",   "Welcome!",   "Hallo daar!",   "¡Bienvenido!",   "Välkommen!",   "Willkommen!",   "Benvenuto!" ] 
var welkom1 = welkom[Math.floor(Math.random()*welkom.length)] 
document.getElementById('begroeting').innerHTML = welkom1;
	}
	window.setInterval(welkom, 4500);  
}

	         function streamer(stream) {
         
        
	var so = new SWFObject("http://www.martijnburg.nl/radio/nativeradio2small.swf", "nativeradio", "468", "45", "10", "#999999");
	so.addParam("scale", "noscale");
	so.addVariable("swfcolor", "999999");
	so.addVariable("swfwidth", "468");
	so.addVariable("swfradiochannel", stream);
	so.addVariable("swfstreamurl", stream);
	so.addVariable("swfpause", "0");
	so.write("flashcontent");
	}
	

function youtubefav() {
	$("#laden").slideDown("slow");
	$.ajax({
  url: 'v2/ajax/youtube.php',
  success: function(data) {
    $('.left').html(data);
    //alert('Filmpjes geladen.');
			$("a.zoom2").fancybox({
				'zoomSpeedIn'		:	500,
				'zoomSpeedOut'		:	500,
				'transitionOut'	:	'elastic'
			});
	$("#laden").slideUp("slow");
  }
});
}

function laaddance() {
	$("#laden").slideDown("slow");
	$.ajax({
  url: 'v2/ajax/dance.php',
  success: function(data) {
    $('.left').html(data);	
	$("#laden").slideUp("slow");
  }
});
}

$(document).ready(function() {
						   
$.ajax({
  url: 'tools/index.php',
  data: 'x=aantal',
  success: function(data) {	 
    var toolsf = "Er zijn in totaal " + data + " bestanden.";	
	var meer = "En nog " + data + " meer!";	
		$("a.tools").fancybox({
		'width'				: 350,
		'height'			: 400,
		'zoomSpeedIn'		:	500,
		'zoomSpeedOut'		:	500,
        'autoScale'     	: false,
        'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'type'				: 'iframe',
		'title'				: toolsf
		});	
	 $('#aantaltools').html(meer);
	
  }
});
	});



	$(document).ready(function() {
			$("a.zoom").fancybox();
 
 
			$("a.zoom2").fancybox({
				'zoomSpeedIn'		:	500,
				'zoomSpeedOut'		:	500,
				'transitionOut'	:	'elastic'
			});
			
			$("a.contactfb").fancybox({
				'width'				: 475,
		'height'			: 225,
		'zoomSpeedIn'		:	500,
		'zoomSpeedOut'		:	500,
        'autoScale'     	: false,
        'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'type'				: 'iframe'
		});
		
					$("a.shortlink").fancybox({
				'width'				: 420,
		'height'			: 170,
		'zoomSpeedIn'		:	500,
		'zoomSpeedOut'		:	500,
        'autoScale'     	: false,
        'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'type'				: 'iframe'
		});
			

		});
	

	