$(document).ready(function(){
    
    $('input.tekstvak, textarea').focus(function(){
        $(this).css('border-color','#3a89b0');
        $(this).prev('label').css('color','#3a89b0');
    });
    $('input.tekstvak, textarea').blur(function(){
        $(this).css('border-color','#bfbfbf');
        $(this).prev('label').css('color','#bfbfbf');
    });
    
    var rows = $('.tekst table tr');  
  
    rows.children().mouseover(function() {
        rows.children().removeClass('highlight');  
        var index = $(this).prevAll().length;  
        if(index != 0) rows.find(':nth-child(' + (index + 1) + ')').addClass('highlight');
    });
    
    $('input[name="betaling"]').click(function(){
        if($(this).is(':checked') && $(this).val() == '0'){
            $('#voorafperjaar').show();
        }else{
            $('#voorafperjaar').hide();
            $('input[name="opdrachtnropfactuur"]').attr('checked',false);
        }
    })
    
});
$(function() {
    $("#menu ul").lavaLamp({
        fx: "backout", 
        speed: 700
    });
});
