      function openbox(url) {
        if(url == '/scripts/hoogtekaart/index.html') {
          $("#pop").width(900);
          $("#pop").height(550);
          $("#pop iframe").width(900);
          $("#pop iframe").height(520);
        }
        else if(url == 'http://ceu.smic.nl/flip/?publication=5323i32') {
          $("#pop").width(900);
          $("#pop").height(610);
          $("#pop iframe").width(900);
          $("#pop iframe").height(580);
        }
        else {
          $("#pop").width(900);
          $("#pop").height(500);
          $("#pop iframe").width(900);
          $("#pop iframe").height(470);
        }
        
        $("#pop iframe").attr("src", url); 
        $("#pop").delay(500).fadeIn(1000);
        $(".stbg").fadeTo(1000, 0.1);
        $(".ct_pane").fadeTo(1000, 0.1, function() { $(this).hide(); });
      }
      
      function closebox() {
        $("#pop").fadeOut(500);
        $(".stbg").fadeTo(500, 1);
        $(".ct_pane").fadeTo(500, 1, function() { $(this).show(); });
      }
        
      function slideMe(fetchId, toLeft, sender) {             
        
        if (!mouseClickAllowed)
          return;
        
        DisableClick();
                
        $("#killed").remove();
        $("#open").attr("id", "old");
        
        $('#container').append('<div id="new" style="display: none; float:left;" class="viewport"></div>');
        var agent = navigator.userAgent;
        var agentelse = 0;

        if(toLeft == 1)
        { 
          $.ajax({
            type: 'GET',
            url: 'http://'+window.location.hostname + '/' + fetchId + "?isAjax=true",
            async: false,
            cache: false,
            data: {
            },
            success:
                function (data) {
                  rawData = $(data).find('#open').html();
                  
                  $('#new').html(data);
                   
                  $('#old').hide("slide", { direction: "right", easing: 'easeInCubic'}, 2000); 
                  $('#cln').show("slide", { direction: "left", easing: 'easeInCubic'}, 2000); 
                  $('#cln').hide("slide", { direction: "right", easing: 'easeOutCubic'}, 2000); 
                  
                  var delay = 1950;
                  if(agent.indexOf('Chrome') != -1)
                  {
                     delay = 2000;
                  }
                  if(agent.indexOf('Firefox') != -1)
                  {
                     delay = 1990;                      
                  }        
                  if(agent.indexOf('MSIE') != -1)
                  {
                     delay = 1950;                        
                  }     
                  $("#new").delay(delay).show("slide", { direction: "left", easing: 'easeOutCubic'}, 2000, EnableClick);
                  
                  $("#old").attr("id", "killed");
                  $("#new").attr("id", "open");
                }
          });  //Ajax Request     
        } else {
          $.ajax({
            type: 'GET',
            url: 'http://' + window.location.hostname + '/' + fetchId + "?isAjax=true",
            async: false,
            cache: false,
            data: {
            },
            success:
                function (data) {
                  rawData = $(data).find('#open').html();                  
                  $('#new').html(data);
                   
                  $('#old').hide("slide", { direction: "left", easing: 'easeInCubic'}, 2000); 
                  $('#cln').show("slide", { direction: "right", easing: 'easeInCubic'}, 2000); 
                  $('#cln').hide("slide", { direction: "left", easing: 'easeOutCubic'}, 2000); 
  
                  var delay = 1950;
                  if(agent.indexOf('Chrome') != -1)
                  {
                     delay = 2000;
                  }
                  if(agent.indexOf('Firefox') != -1)
                  {
                     delay = 1990;                      
                  }        
                  if(agent.indexOf('MSIE') != -1)
                  {
                     delay = 1950;                        
                  }     
                  $("#new").delay(delay).show("slide", { direction: "right", easing: 'easeOutCubic'}, 2000, EnableClick);

                  $("#old").attr("id", "killed");
                  $("#new").attr("id", "open");
                 
                  setTimeout("carousel()", 1000);
                }
          });  //Ajax Request           
        }
      } // Function   

      
      function slideMeIframe(fetchId, iframeUrl) {      
        if (!mouseClickAllowed)
          return;
        DisableClick();
        $("#killed").remove();
        $("#open").attr("id", "old");
        
        $('#container').append('<div id="new" style="display: none; float:left;" class="viewport"></div>');
        var agent = navigator.userAgent;
        var agentelse = 0;
        
        $.ajax({
          type: 'GET',
          url: 'http://' + window.location.hostname + '/' + fetchId + "?isAjax=true&iframeUrl=" + iframeUrl,
          async: false,
          cache: false,
          data: {
          },
          success:
              function (data) {
                rawData = $(data).find('#open').html();
                
                $('#new').html(data);
                 
                $('#old').hide("slide", { direction: "left", easing: 'easeInCubic'}, 2000); 
                $('#cln').show("slide", { direction: "right", easing: 'easeInCubic'}, 2000); 
                $('#cln').hide("slide", { direction: "left", easing: 'easeOutCubic'}, 2000); 

                var delay = 1950;
                if(agent.indexOf('Chrome') != -1)
                {
                   delay = 2000;
                }
                if(agent.indexOf('Firefox') != -1)
                {
                   delay = 1990;                      
                }        
                if(agent.indexOf('MSIE') != -1)
                {
                   delay = 1950;                        
                }     
                $("#new").delay(delay).show("slide", { direction: "right", easing: 'easeOutCubic'}, 2000, EnableClick);

                $("#old").attr("id", "killed");
                $("#new").attr("id", "open");
              }
          });  //Ajax Request   
        } // Function   

var mouseClickAllowed = true;

function DisableClick() {
  //$("a").removeAttr("href");
  mouseClickAllowed = false;
}

function EnableClick() {
  mouseClickAllowed = true;
}

$(document).ready(function() {
  setTimeout("carousel()",0);
});

var newsCar = null;
function carousel() 
{    
    jQuery('.jcarousel-skin-tango').jcarousel({
      scroll    : 1,
      itemFallbackDimension : 673
    });
  
    jQuery(".tickerbox").jcarousel({
      auto      : 1,
      wrap      : 'circular',
      scroll    : 1,
      animation : 3000,
      itemFallbackDimension : 169
    });
}




