$(document).ready(function(){
     
bookmarks();


  $("#reason ul li")
  
  $("#reason ul li").hoverIntent({    
       over: makeShowReason, 
       timeout: 100, 
       out: makeHideReason  
  });
  
hoverIe6();
});

function makeShowReason()
{
  $(this).css('z-index','100');
  $(this).children('div').fadeIn();
}      

function makeHideReason()
{ 
  $(this).children('div').fadeOut(function (){
    $(this).parent().css('z-index','0');
  });
}

//Fix hover in ie 6 for li
function hoverIe6(){
  if ($.browser.msie ) {
   if (parseInt($.browser.version, 10)==6)
   {
      $('#presentation ul li[class!=actie6]').hover(
      function(){
        $(this).addClass('actie6');    
      }  
      ,
      function(){
        $(this).removeClass('actie6');       
      }
      );   
   }
  }
}

function bookmarks(){
	$('ul.tabs').delegate('li:not(.act)', 'click', function() {
		actcopy=$(this).addClass('act').siblings().removeClass('act')
			.parents('div.section').find('div.box');
      actcopy.fadeOut(1200);   
      actcopy.eq($(this).index()).fadeIn(1200);    
    return false;
	});   
	$('#presentation').mouseenter( function() {
      $(this).stopTime('tabchange');
  }
  ).mouseleave(function(){
      inittabschange();
  }
  );    
  
  inittabschange();
}

function inittabschange(){
  ic=0;
	$('#presentation').everyTime(12000, 'tabchange', function() {
      if (ic==0) {
        ic=1;
        $('#presentation .tabs li:eq('+ic+')').click();
   
      }
      else{
        ic=0;      
        $('#presentation .tabs li:eq('+ic+')').click();        
      }
	});
}
