    /* jshint browser: true */

    //animation ID's needed for cancelAnimationFrame
    var eyeshadowAnim;

    var eyeshadow = document.getElementById('eyeshadow');
    var eyeshadowCtx = eyeshadow.getContext('2d');
    var eyeshadowColor;

    //apply eyeshadow
    function applyEyeshadow() {
        var hex = "#" + eyeshadowColor;

        //eyeshadowCtx.clearRect(0, 0, eyeshadow.width, eyeshadow.height);

        if (ctrack.getCurrentPosition()) {
            //ctrack.draw(overlay);
            //if (isRealTime) {
            eyeshadowAnim = compatibility.requestAnimationFrame(applyEyeshadow);

            positions = ctrack.getCurrentPosition();

            eyeshadowCtx.clearRect(0, 0, eyeshadow.width, eyeshadow.height);

            eyeshadowCtx.beginPath();

            eyeshadowCtx.moveTo((4 * positions[25][0] / 5 + positions[22][0] / 5), (4 * positions[25][1] / 5 + positions[22][1] / 5));
            eyeshadowCtx.lineTo((2 * positions[21][0] / 3 + positions[27][0] / 3), (2 * positions[21][1] / 3 + positions[27][1] / 3));
            eyeshadowCtx.lineTo((2 * positions[20][0] / 3 + positions[27][0] / 3), (2 * positions[20][1] / 3 + positions[27][1] / 3));
            eyeshadowCtx.lineTo((2 * positions[19][0] / 3 + positions[27][0] / 3), (2 * positions[19][1] / 3 + positions[27][1] / 3));
            eyeshadowCtx.lineTo((4 * positions[23][0] / 5 + positions[19][0] / 5), (4 * positions[23][1] / 5 + positions[19][1] / 5));
            eyeshadowCtx.lineTo((4 * positions[63][0] / 5 + positions[20][0] / 5), (4 * positions[63][1] / 5 + positions[20][1] / 5));
            eyeshadowCtx.lineTo((4 * positions[64][0] / 5 + positions[21][0] / 5), (4 * positions[64][1] / 5 + positions[21][1] / 5));
            ///eyeshadowCtx.closePath();

            //eyeshadowCtx.beginPath();

            eyeshadowCtx.moveTo((4 * positions[30][0] / 5 + positions[18][0] / 5), (4 * positions[30][1] / 5 + positions[18][1] / 5));
            eyeshadowCtx.lineTo((2 * positions[17][0] / 3 + positions[32][0] / 3), (2 * positions[17][1] / 3 + positions[32][1] / 3));
            eyeshadowCtx.lineTo((2 * positions[16][0] / 3 + positions[32][0] / 3), (2 * positions[16][1] / 3 + positions[32][1] / 3));
            eyeshadowCtx.lineTo((2 * positions[15][0] / 3 + positions[32][0] / 3), (2 * positions[15][1] / 3 + positions[32][1] / 3));
            eyeshadowCtx.lineTo((4 * positions[28][0] / 5 + positions[15][0] / 5), (4 * positions[28][1] / 5 + positions[15][1] / 5));
            eyeshadowCtx.lineTo((4 * positions[67][0] / 5 + positions[16][0] / 5), (4 * positions[67][1] / 5 + positions[16][1] / 5));
            eyeshadowCtx.lineTo((4 * positions[68][0] / 5 + positions[17][0] / 5), (4 * positions[68][1] / 5 + positions[17][1] / 5));
            eyeshadowCtx.closePath();

            eyeshadowCtx.globalCompositeOperation = "overlay";
            eyeshadowCtx.fillStyle = hex;
            eyeshadowCtx.fill();
        }
    }
