function getUrlVars()
{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for(var i = 0; i < hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    return vars;
}

$(function() {

  $('a[href^=http]').each(function() {
    if(this.href.indexOf('tijd.be') == -1) {
      if(this.href.indexOf('tijdblogs.typepad.com') == -1) {
        $(this).click(function(){window.open(this.href);return false;});
      }
    }
  });

  $('img.asset-image').parent().removeAttr("href");

  var cookieval = $.cookie('lwic');

  if(cookieval!='y') {

    $(window).scroll(function(){
      var relatedPeeksAt = $('#slideout').offset().top - $(window).height();
      var floorPeeksAt = $('#footer').offset().top - $(window).height();

      if ($(window).scrollTop() > relatedPeeksAt)
      {
        $('#slideoutbox').animate({'right':'0px'},300);
      } else {
        $('#slideoutbox').stop(true).animate({'right':'-627px'},300);
      }

      if ($(window).scrollTop() < 25)
      {
        $('#slideoutbox').stop(true).animate({'right':'-627px'},300);
      }
    });
  }

  $('#slideoutbox .close').bind('click',function(){
    $(this).parent().hide();
    $.cookie('lwic', 'y',{path: '/'});
  });

  var params=getUrlVars();
  if (params['highlight']) $('div.entry-body p').highlight(params['highlight']);

});
<!-- ph=1 -->

