var slides;

sfHover = function() {
  var sfEls = document.getElementById("topMenu").getElementsByTagName("LI");
  for (var i=0; i<sfEls.length; i++) {
    sfEls[i].onmouseover=function() {
      this.className+=" sfhover";
    }
    sfEls[i].onmouseout=function() {
      this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
    }
  }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

var flashvars = {};
var params = {};
params.wmode = "transparent";
var attributes = {};
swfobject.embedSWF("gfx/slide_home.swf", "slide", "969", "213", "8","gfx/expressInstall.swf", flashvars, params, attributes );


window.addEvent('domready', function() {

  // Project popup slider
  SqueezeBox.assign($$('a[rel=boxed]'), {
      onOpen:  $empty,
      onClose: function() { slides = ''; },
      onUpdate: function() {
          if ( slides.length > 0 ) new Slideshow('show', slides, {controller: true, hu: 'beheer/upload/', thumbnails: true});
        },
      onResize: $empty,
      onMove: $empty,
      onShow: $empty,
      onHide: $empty,
      size: {x: 874, y: 352},
      sizeLoading: {x: 200, y: 150},
      marginInner: {x: 20, y: 20},
      marginImage: {x: 50, y: 75},
      handler: false,
      target: null,
      closable: true,
      closeBtn: true,
      zIndex: 65555,
      overlayOpacity: 0.7,
      classWindow: '',
      classOverlay: '',
      overlayFx: {},
      resizeFx: {},
      contentFx: {},
      parse: false, // 'rel'
      parseSecure: false,
      shadow: false,
      document: null,
      ajaxOptions: {
        method: 'get',
        evalScripts: 'true'
      }
  });

  // Home Slider
  // instance with a few options
  if ( document.id('slideshowHome') ) {
    mySlideShow = new SlideShow('slideshowHome',{
      delay: 3000
    });

    $('showNext').addEvent('click',function(){
      mySlideShow.showNext();
    });
    
    $('showPrevious').addEvent('click',function(){
      mySlideShow.showPrevious();
    });

  }

});
