﻿
jQuery.extend(jQuery.validator.messages, {
    required: "Dit veld is verplicht.",
    maxlength: jQuery.format("U kunt niet meer dan {0} karakters invoeren."),
    minlength: jQuery.format("U dient minimaal {0} karakters in te voeren."),
    rangelength: jQuery.format("U dient minimaal {0} en maximaal {1} karakters in te voeren."),
    email: "Een geldig e-mailadres is verplicht.",
    url: "Een geldig webadres is verplicht.",
    date: "Een geldige datum is verplicht.",
    number: "Een geldig getal is verplicht.",
    digits: "Gebruik alleen cijfers.",
    equalTo: "Herhaal de invoer nogmaals.",
    range: jQuery.format("U dient een waarde tussen {0} en {1} in te voeren."),
    max: jQuery.format("U dient een waarde kleiner dan of gelijk aan {0} in te voeren."),
    min: jQuery.format("U dient een waarde groter dan of gelijk aan {0} in te voeren."),
    creditcard: "Een geldig creditcardnummer is verplicht."
});
jQuery(document).ready(function () {


    $("#EmailAddress").addClass("email");

    if ($(".specialismreadmore").length > 0) {
        $("#page").append($(".specialismreadmore"));
        $(".specialismreadmore").css({ "top": (($(".specialismtab").offset().top)) + "px",
            "position": "absolute", "right": "5px", "width": "250px", "display": "none"
        });
    }

    if ($("#tabbottom").length > 0) {
        if (jQuery.support.leadingWhitespace) {
            $("#verticalbar").css("top", ($("#tabbottom").offset().top) + "px");
        } else {
            $("#verticalbar").css("top", ($("#tabbottom").offset().top - 3) + "px");
        }
    }

    if ($(".advocaatinfo").length > 0) {
        $(".advocaatinfo").css("top", (($("#tabbottom").offset().top - 238)) + "px");
    }

    $(".tabtext a[rel='more']").click(function () {
        $("#quote1").fadeIn();
        window.setTimeout(function () {
            $("#quote2").fadeIn();
        }, 1000);
        return false;
    });
    $("#extracol2 a[rel='advocaatreadmore']").click(function () {
        $("#advocaatreadmore").fadeIn();

        return false;
    });

    $("#content a[rel='vakgebiedreadmore']").click(function () {

        $(".specialismreadmore").fadeIn();

        return false;
    });


    $('#tabfader').innerfade({ speed: 2500, timeout: 5000, type: 'sequence', containerheight: '260px' });
    $('#newsfader').innerfade({ speed: 'slow', timeout: 4000, type: 'sequence', containerheight: '60px' });
    if ($("#verticaltabs").length > 0) {
        $("#verticaltabs").css("margin-top", (($(".specialismtab").offset().top - 105)) + "px");

    }
    if ($("#vakgroepimage").length > 0) {
        $("#vakgroepimage").css("margin-top", (($(".specialismtab").offset().top)) + "px");

    }



    if ($(".advocaattitel").length > 0) {
        $("#page").append($(".advocaattitel"));
        $(".advocaattitel").css("top", (($("#verticalbar").offset().top)) + "px");
    }


});
