   /*
	*	DOM load functions
	*
	*/	
		
	var base_url = 'http://www.wtr-trendrapport.nl';
		
	jQuery(document).ready(function(){

		jQuery("a[@rel=external]").each(function(i){ this.target="_blank"; });

		jQuery("#response").hide();
		
		jQuery("#comment_response").hide();

		if(jQuery("#comments").length > 0) {

			jQuery("#comments").load(base_url + '/includes/comments.inc.php');
		
		}

		var options = { 
			target:        	'#response',   									// div waarin de response komt te staan

			success:		function(){
		
								jQuery("#vote-options").fadeOut(500, function(){
									jQuery("#response").fadeIn(500);									 
								});

							},
							
			clearForm: 		false,        									// alle formulier velden wissen
			
			timeout:   		3000 
		};
		
		var options2 = { 
		
			target:        	'#comment_response',   									// div waarin de response komt te staan

			success:		function(){
		
								jQuery("#comment_response").fadeIn(500, function(){	
		
									jQuery("#comments").load(base_url + '/includes/comments.inc.php');
									
									jQuery("#comment_response").animate({opacity: 1.0}, 2000);
									
									jQuery("#comment_response").fadeOut(500);

								});

							},
							
			clearForm: 		true,        									// alle formulier velden wissen
			
			timeout:   		3000 
			
		};
		
		jQuery('#vote_form1').ajaxForm(options); 
		jQuery('#vote_form2').ajaxForm(options);
		
		jQuery('#comment_form').ajaxForm(options2);

	});