// jquery noconflict gebruiken!
var $j = jQuery.noConflict();  
// onload functies
$j(document).ready(function(){
  
   // verberg antwoorden
   $j(".expand div").hide();
    
   // toon .antwoord na klik op .vraag
    $j(".expand > a").click(function () {
      if ($j(this).next("div").css("display")=="none"){
         $j(".expand .active").removeClass("active");
         $j(".expand div").animate({ height: 'hide', opacity: 'hide' }, "slow");
         $j(this).next("div").animate({ height: 'show', opacity: 'show' }, "slow");
         $j(this).addClass("active");
      } else {
         $j(this).next("div").animate({ height: 'hide', opacity: 'hide' }, "slow");
         // gebruik animate MET opacity, dit werkt beter in IE.
         $j(this).removeClass("active");
      }
      return false;
    });     
    
      
});

// show en hide fuctie voor send a friend -en- reageerpagina
function showdiv(wie){
   $j(wie).slideDown();
}   
function hidediv(wie){
   $j(wie).slideUp();
} 

function targetBlank(object,target) {

  // Get the URL 
  link = object.href;

  // If target == "_self" or target == "_blank", don't ask confirmation from user
  if(target=='_self') {
	window.open(link,target);
  }
  else if(target=='_blank') {
	window.open(link,target);
  }
  else {

    // Ask confirmation
    if (confirm("U heeft een externe link ("+link+") aangeroepen.\n\nWilt u een nieuw venster openen en verder gaan?") ) {
	// Open the page
	window.open(link,target);
    }
    else {
	// Alert the user the page didn't opened
	alert("De pagina is niet geopend!");
    }
  }
}
