﻿$(document).ready(function () {
    // koppel history.back aan de terug link en toon deze op het scherm
    $('#backLink').click(function () {
        history.back();
    }).css('visibility', 'visible');

    // bind click handler voor print
    $('#print').click(function () {
        window.print();
    });

    // bind change font size 
    $('#changeFontSize').click(function () {
        var stepSize = 10;
        var maxSize = 140;
        var currentFontSize = $('#mainContent').attr('fontsize') || 100;
        var newFontSize = parseInt(currentFontSize) + stepSize;
        if (newFontSize > maxSize) {
            newFontSize = 100;
        }
        $('#mainContent').css('font-size', newFontSize + '%').attr('fontsize', newFontSize);

    });

    // toon print en change font size links
    $('#printLinks').css('visibility', 'visible');

    //op homepage zorg dat moreLinks op gelijke hoogte staan, alleen maar doen bij 3 blokjes
    if ($('#homeStrip').length > 0 && $('#homeStrip .moreLink').length == 3) {
        var maxTop;
        var top1 = $('#homeStrip .moreLink').eq(0).offset().top;
        var top2 = $('#homeStrip .moreLink').eq(1).offset().top;
        var top3 = $('#homeStrip .moreLink').eq(2).offset().top;

    }

    // op landingspagina inlogbutton artsen en patienten op click inlog formuliertje laten zien 
    $('#inloggenArtsenBtn').click(function () {
        $('body').addClass('landingsLoginArtsen');
        return false;
    });
    $('#inloggenPatientenBtn').click(function () {
        $('body').addClass('landingsLoginPatienten');
        return false;
    });
});
