(function(b){var k={},a,l,c=document,i=window,h=c.documentElement,j=b.expando;b.event.special.inview={add:function(d){k[d.guid+"-"+this[j]]={data:d,$element:b(this)}},remove:function(d){try{delete k[d.guid+"-"+this[j]]}catch(m){}}};function g(){var n,d,m={height:i.innerHeight,width:i.innerWidth};if(!m.height){n=c.compatMode;if(n||!b.support.boxModel){d=n==="CSS1Compat"?h:c.body;m={height:d.clientHeight,width:d.clientWidth}}}return m}function e(){return{top:i.pageYOffset||h.scrollTop||c.body.scrollTop,left:i.pageXOffset||h.scrollLeft||c.body.scrollLeft}}function f(){var o=b(),n,m=0;b.each(k,function(y,x){var v=x.data.selector,w=x.$element;o=o.add(v?w.find(v):w)});n=o.length;if(n){a=a||g();l=l||e();for(;m<n;m++){if(!b.contains(h,o[m])){continue}var t=b(o[m]),u={height:t.height(),width:t.width()},d=t.offset(),p=t.data("inview"),r,q,s;if(!l||!a){return}if(d.top+u.height>l.top&&d.top<l.top+a.height&&d.left+u.width>l.left&&d.left<l.left+a.width){r=(l.left>d.left?"right":(l.left+a.width)<(d.left+u.width)?"left":"both");q=(l.top>d.top?"bottom":(l.top+a.height)<(d.top+u.height)?"top":"both");s=r+"-"+q;if(!p||p!==s){t.data("inview",s).trigger("inview",[true,r,q])}}else{if(p){t.data("inview",false).trigger("inview",[false])}}}}}b(i).bind("scroll resize",function(){a=l=null});setInterval(f,250)})(jQuery);function bindLazyLoadingImages(){$("img.lazy").one("inview",function(d,b,a,e){if(b){var c=$(this);c.removeClass("lazy");c.attr("src",c.attr("data-original"))}})}
function delayTimer(){var timer;return function(fun,time){clearTimeout(timer);timer=setTimeout(fun,time)}}var delayFunction=delayTimer();function livesearch1(){if(httpObject.readyState==4){document.getElementById("content").innerHTML=httpObject.responseText;$(document).ready(function(){bindLazyLoadingImages()});document.getElementById("content").style.opacity=1;document.getElementById("content").style.filter="alpha(opacity=100);"}}function livesearch(){var searchtag=document.getElementById("searchfield_main").value;if(searchtag.length>=3||searchtag.length==0){httpObject=getHTTPObject();if(httpObject!=null){document.getElementById("content").style.opacity=0.4;document.getElementById("content").style.filter="alpha(opacity=40)";document.title=document.getElementById("searchfield_main").value+" zoeken";httpObject.open("GET","/search.php?livesearch=1&q="+document.getElementById("searchfield_main").value,true);httpObject.send(null);httpObject.onreadystatechange=livesearch1}}}var httpObject=null;


