﻿/*function zoeken(){
  var inpZoek = document.getElementById('zoeken_input');
  var strZoek = inpZoek.value;
  if(strZoek.length>0) {
    strZoek = escape(strZoek);
    strZoek = strZoek.replace(/ /g,'+').replace(/\%20/g,'+');
    document.location.href = "/pages/zoeken.aspx?zoek="+ strZoek;
  }
}
var strPrevFaqId = '';
var strPrevFaqEl = '';

function hideun(strId,el) {
  if(strPrevFaqId == strId) {
    document.getElementById(strPrevFaqId).className = 'antwoord';
    strPrevFaqEl.className = 'vraag';
    strPrevFaqId = ''    
    return;
  }
  if(strPrevFaqId != '') {
     document.getElementById(strPrevFaqId).className = 'antwoord';
     strPrevFaqEl.className = 'vraag';
  }
  document.getElementById(strId).className = 'antwoord antwoordactief';
  el.className = 'vraag vraagactief';
  strPrevFaqId = strId;
  strPrevFaqEl = el;
}*/
$(document).ready(function() {
  /* Lightbox activeren */
  $(".lightbox").lightbox();

  /* Carousel op home activeren */
  var deinnerfade = $('#carousel_inner').innerfade({
    speed: 'slow',
    timeout: 10000,
    type: 'sequence',
    containerheight: '302px'
  });
	$('img[movie]').click(function (e) {
		e.preventDefault();
		$.modal("<div id='modalvideo'></div>");
		$('#modalvideo').flash(
        { 
          src: '/interface/flash/player.swf',
          width: 600,
          height: 400,
		  menu: 'false',
	      quality: 'high',
	      bgcolor: '000000',
	      allowFullScreen: 'true',
	      allowscriptaccess: 'always',  
          wmode: 'transparent', 
          flashvars: { debug: 'false',autoplay: 'true', url: $(this).attr("movie")+'?t'+new Date().getTime(),image:'',maincolor: 'e3000f'}
        },
        {version: 8 }
    );
	});
	
	$(".banner_flash").flash(null, { version: 9 }, function(htmlOptions) {
		  var $this = $(this);
		  htmlOptions.src = $(this).attr("file");
		  htmlOptions.width = 287;
		  htmlOptions.height = 168;
		  htmlOptions.allowFullscreen = 'true';
		  htmlOptions.wmode = 'transparent';
		  htmlOptions.allowScriptAccess = 'always';	
		  $this.html('');
		  $this.addClass('flash-replaced').prepend($.fn.flash.transform(htmlOptions));
	});
  
/* IE6 fix voor hovers op portfolio-preview-items (werkt niet helemaal) */
/* if ($.browser.msie && $.browser.version <= 6) $("#main #home_portfolio_previews .item").mouseover(function() { $(this).toggleClass("hover") }).mouseout(function(){ $(this).toggleClass("hover") });*/

});

/* Zoekfunctie */

function zoek(){
  var inpZoek = document.getElementById('zoeken_input');
  var strZoek = inpZoek.value;
  if(strZoek.length>0) {
    strZoek = escape(strZoek);
    strZoek = strZoek.replace(/ /g,'+').replace(/\%20/g,'+');
    document.location.href = "/pages/zoeken.aspx?zoek="+ strZoek;
  }
}

// Default-tekst in tekstveld verbergen onFocus
function textFieldFocus(object, defaultValue) {
  if (object.value == defaultValue) {
    object.value = "";
  }
}

// Default-tekst in tekstveld herstellen onBlur
function textFieldBlur(object, defaultValue) {
  if (object.value == "") {
    object.value = defaultValue;
  }
}

