$(document).ready(function(){

	var fadeDuration = 150;      
      $('#menu ul li').hover(function() {
        $(this).find('.pijltje').animate({ paddingLeft: '5px' }, fadeDuration);
        $(this).find('.pijltje').children('span').show().animate({ left: -5 }, fadeDuration);
      }, function() {
        $(this).find('.pijltje').animate({ paddingLeft: '0px' }, fadeDuration);
        $(this).find('.pijltje').children('span').animate({ left: -35 }, fadeDuration).fadeOut(fadeDuration);          
      });
      
      $('.arrow').hover(function() {
        $(this).find('.pijltje').animate({ paddingLeft: '5px' }, fadeDuration);
        $(this).find('.pijltje').children('span').show().animate({ left: -5 }, fadeDuration);
      }, function() {
        $(this).find('.pijltje').animate({ paddingLeft: '0px' }, fadeDuration);
        $(this).find('.pijltje').children('span').animate({ left: -35 }, fadeDuration).fadeOut(fadeDuration);          
      }); 
      
      $('.arrow').hover(function() {
        $(this).find('.pijltje-box').animate({ paddingLeft: '5px' }, fadeDuration);
        $(this).find('.pijltje-box').children('span').show().animate({ left: -5 }, fadeDuration);
      }, function() {
        $(this).find('.pijltje-box').animate({ paddingLeft: '0px' }, fadeDuration);
        $(this).find('.pijltje-box').children('span').animate({ left: -35 }, fadeDuration).fadeOut(fadeDuration);          
      }); 
         
      $('#kennismaken-submenu ul li').hover(function() {
        $(this).find('.pijltje').animate({ paddingLeft: '5px' }, fadeDuration);
        $(this).find('.pijltje').children('span').show().animate({ left: -5 }, fadeDuration);
      }, function() {
        $(this).find('.pijltje').animate({ paddingLeft: '0px' }, fadeDuration);
        $(this).find('.pijltje').children('span').animate({ left: -35 }, fadeDuration).fadeOut(fadeDuration);          
      });	
      
      $('#loopbaan-submenu ul li').hover(function() {
        $(this).find('.pijltje').animate({ paddingLeft: '5px' }, fadeDuration);
        $(this).find('.pijltje').children('span').show().animate({ left: -5 }, fadeDuration);
      }, function() {
        $(this).find('.pijltje').animate({ paddingLeft: '0px' }, fadeDuration);
        $(this).find('.pijltje').children('span').animate({ left: -35 }, fadeDuration).fadeOut(fadeDuration);          
      });
      
      $('#solliciteren-submenu ul li').hover(function() {
        $(this).find('.pijltje').animate({ paddingLeft: '5px' }, fadeDuration);
        $(this).find('.pijltje').children('span').show().animate({ left: -5 }, fadeDuration);
      }, function() {
        $(this).find('.pijltje').animate({ paddingLeft: '0px' }, fadeDuration);
        $(this).find('.pijltje').children('span').animate({ left: -35 }, fadeDuration).fadeOut(fadeDuration);          
      });
    
      $('.box').hover(function() {
        $(this).find('.pijltje-box').animate({ paddingLeft: '5px' }, fadeDuration);
        $(this).find('.pijltje-box').children('span').show().animate({ left: -5 }, fadeDuration);
      }, function() {
        $(this).find('.pijltje-box').animate({ paddingLeft: '0px' }, fadeDuration);
        $(this).find('.pijltje-box').children('span').animate({ left: -35 }, fadeDuration).fadeOut(fadeDuration);          
      });  
      
      $('.box').hover(function() {
        $(this).find('.pijltje-terug').animate({ paddingLeft: '5px' }, fadeDuration);
        $(this).find('.pijltje-terug').children('span').show().animate({ right: -5 }, fadeDuration);
      }, function() {
        $(this).find('.pijltje-terug').animate({ paddingLeft: '0px' }, fadeDuration);
        $(this).find('.pijltje-terug').children('span').animate({ right: -35 }, fadeDuration).fadeOut(fadeDuration);          
      });  
               
            
     $('.bcbox').hover(function() {
        $(this).find('.pijltje-box').animate({ paddingLeft: '5px' }, fadeDuration);
        $(this).find('.pijltje-box').children('span').show().animate({ left: -5 }, fadeDuration);
      }, function() {
        $(this).find('.pijltje-box').animate({ paddingLeft: '0px' }, fadeDuration);
        $(this).find('.pijltje-box').children('span').animate({ left: -35 }, fadeDuration).fadeOut(fadeDuration);          
      });
      
      
      $('.navrechts').hover(function() {
        $(this).animate({ paddingLeft: '5px' }, fadeDuration);
        $(this).children('span').show().animate({ left: -5 }, fadeDuration);
      }, function() {
        $(this).animate({ paddingLeft: '0px' }, fadeDuration);
        $(this).children('span').animate({ left: -35 }, fadeDuration).fadeOut(fadeDuration);          
      });
      
      
      $('.navlinks').hover(function() {
        $(this).animate({ backgroundPosition: '0px' }, fadeDuration);
        $(this).children('span').show().animate({ right: 0 }, fadeDuration);
      }, function() {
        $(this).animate({ backgroundPosition: '-5px' }, fadeDuration);
        $(this).children('span').animate({ right: 0 }, fadeDuration).fadeOut(fadeDuration);          
      }); 
      

      $('.magazineaanvragen-navrechts').hover(function() {
        $(this).animate({ paddingLeft: '5px' }, fadeDuration);
        $(this).children('span').show().animate({ left: -5 }, fadeDuration);
      }, function() {
        $(this).animate({ paddingLeft: '0px' }, fadeDuration);
        $(this).children('span').animate({ left: -35 }, fadeDuration).fadeOut(fadeDuration);          
      });
      
      
      $('.magazineaanvragen-navlinks').hover(function() {
        $(this).animate({ backgroundPosition: '0px' }, fadeDuration);
        $(this).children('span').show().animate({ right: 0 }, fadeDuration);
      }, function() {
        $(this).animate({ backgroundPosition: '-5px' }, fadeDuration);
        $(this).children('span').animate({ right: 0 }, fadeDuration).fadeOut(fadeDuration);          
      });        
      
      
      $('.pijltjerechts').hover(function() {
        $(this).animate({ paddingRight: '17px' }, fadeDuration);
        $(this).children('span').show().animate({ right: 0 }, fadeDuration);
      }, function() {
        $(this).animate({ paddingRight: '12px' }, fadeDuration);
        $(this).children('span').animate({ right: 0 }, fadeDuration).fadeOut(fadeDuration);          
      });   
      
      $('.pijltjelinks').hover(function() {
        $(this).animate({ backgroundPosition: '0px' }, fadeDuration);
        $(this).children('span').show().animate({ right: 0 }, fadeDuration);
      }, function() {
        $(this).animate({ backgroundPosition: '5px' }, fadeDuration);
        $(this).children('span').animate({ right: 0 }, fadeDuration).fadeOut(fadeDuration);          
      });     
      
      $('.pijltjerechts-agenda').hover(function() {
        $(this).animate({ paddingRight: '17px' }, fadeDuration);
        $(this).children('span').show().animate({ right: 0 }, fadeDuration);
      }, function() {
        $(this).animate({ paddingRight: '12px' }, fadeDuration);
        $(this).children('span').animate({ right: 0 }, fadeDuration).fadeOut(fadeDuration);          
      });   
      
      $('.pijltjelinks-agenda').hover(function() {
        $(this).animate({ backgroundPosition: '0px' }, fadeDuration);
        $(this).children('span').show().animate({ right: 0 }, fadeDuration);
      }, function() {
        $(this).animate({ backgroundPosition: '5px' }, fadeDuration);
        $(this).children('span').animate({ right: 0 }, fadeDuration).fadeOut(fadeDuration);          
      });        
        
      $('.facebookoverlay').fadeTo('fast', 0.0);
      $('.facebook').hover(function() {
        $(this).find('.facebookoverlay').fadeTo(300, 1.0);
      }, function() {
		$(this).find('.facebookoverlay').fadeTo(300, 0.0);    
      });
     
      
    Cufon.replace('.menulink', { fontFamily: 'TradeGothic', hover: true}); 
	Cufon.replace('.menulink-1', { fontFamily: 'TradeGothic', hover: true});
	Cufon.replace('.menulink-2', { fontFamily: 'TradeGothic', hover: true}); 
	Cufon.replace('.menulink-3', { fontFamily: 'TradeGothic', hover: true}); 
	Cufon.replace('.menulink-4', { fontFamily: 'TradeGothic', hover: true}); 
	Cufon.replace('h2', { fontFamily: 'TradeGothicBold', hover: true}); 
	Cufon.replace('.naam', { fontFamily: 'TradeGothicBold', hover: true}); 
	Cufon.replace('.naamhover', { fontFamily: 'TradeGothicBold', hover: true}); 
	Cufon.replace('.functie', { fontFamily: 'TradeGothic', hover: true}); 
	Cufon.replace('.contactnaam', { fontFamily: 'TradeGothicBold', hover: true}); 
	Cufon.replace('.contactnaamhover', { fontFamily: 'TradeGothicBold', hover: true}); 
	Cufon.replace('.contactgegevens-titel', { fontFamily: 'TradeGothicBold', hover: true}); 
	Cufon.replace('#titel', { fontFamily: 'TradeGothicBold', hover: true}); 
    Cufon.replace('.bold', { fontFamily: 'TradeGothicBold', hover: true});
 	Cufon.replace('.homecontact', { fontFamily: 'TradeGothic', hover: true});


        
    $("ul.studentenontdekken").hover(function(){
        $('.menulink').css('background', '#11a45a');
    
    }, function(){
        $('.menulink').css('background', 'none');
    });
    $("ul.debrauw").hover(function(){
        $('.menulink-1').css('background', '#a13437');
    
    }, function(){
        $('.menulink-1').css('background', 'none');
    });    
    $("ul.loopbaan").hover(function(){
        $('.menulink-2').css('background', '#138597');
    
    }, function(){
        $('.menulink-2').css('background', 'none');
    });      
    $("ul.kennismaken").hover(function(){
        $('.menulink-3').css('background', '#c8a200');
    
    }, function(){
        $('.menulink-3').css('background', 'none');
    });      
    $("ul.solliciteren").hover(function(){
        $('.menulink-4').css('background', '#737419');
    
    }, function(){
        $('.menulink-4').css('background', 'none');
    }); 
    
    
	$('ul li a').live('touchend', function(e) {
	    var el = $(this);
	    var link = el.attr('href');
	    window.location = link;
	});
	   
               
});

