-$(document).ready(function(){
						   
$(".faq").colorbox({width:"70%", height:"50%", iframe:true});
$(".reportlink").colorbox({width:"70%", height:"60%", iframe:true});


	$("#submit").click(function(event){
		if ($("#input").val() != ''){
			$("#result").fadeOut("slow");			

			$("#name").html("");
			$("#photo").html("");
			$("#url").val("");
			
			
			$.post("includes/ajax.php", { url: $("#input").val() },
			function(data){		
				if (data == 1){
					$("#error").html("Er is helaas een fout opgetredeh!");
					$("#error").fadeIn("slow");
				} else if (data != 1){				
					$("#error").fadeOut("slow");
					var splitted = data.split('__SPLIT__');
					
					$("#name").html(splitted[0]);
					$("#photo").html(splitted[2]);
					$("#url").val(splitted[1]);	
					$("#result").fadeIn("slow");				
				}		
			});	
		} else {
			$("#result").fadeOut("slow");
			$("#error").html("Je moet natuurlijk wel een url invulleh!");
			$("#error").fadeIn("slow");
		}
	});	
	
	$("#input").keypress(function (evt) {
     	if (evt.keyCode == 13) {
					if ($("#input").val() != ''){
					$("#result").fadeOut("slow");			
		
					$("#name").html("");
					$("#photo").html("");
					$("#url").val("");
					
					
					$.post("includes/ajax.php", { url: $("#input").val() },
					function(data){							
						if (data == 1){
							$("#error").html("Er is helaas een fout opgetredeh!");
							$("#error").fadeIn("slow");
						} else if (data != 1){				
							$("#error").fadeOut("slow");
							var splitted = data.split('__SPLIT__');
							
							$("#name").html(splitted[0]);
							$("#photo").html(splitted[2]);
							$("#url").val(splitted[1]);	
							$("#result").fadeIn("slow");				
						}		
					});	
				} else {
					$("#result").fadeOut("slow");
					$("#error").html("Je moet natuurlijk wel een url invulleh!");
					$("#error").fadeIn("slow");
				}
    	 }
	 }); 

});