    /* jshint browser: true */

    var lipstick = (function() {
        //animation ID's needed for cancelAnimationFrame
        var lipstickAnim;

        // create the root of the scene graph
        var lipstickGfx = new PIXI.Graphics();
        var blurFilter = new PIXI.filters.BlurFilter();

        blurFilter.passes = 5;
        blurFilter.blur = 30;
        lipstickGfx.filters = [blurFilter];
        lipstickGfx.alpha = 0.6;

        var drawLipstick = function(color) {
            var hex = "0x" + color;

            if (!lipstickGfx.stage) {
                videoSprite.addChild(lipstickGfx);
            }

            applyLipstick();

            //apply lipstick PIXI
            function applyLipstick() {
                lipstickAnim = requestAnimationFrame(applyLipstick);

                //lipglossGfx.clear();
                lipstickGfx.clear();

                // set a fill and line style
                lipstickGfx.beginFill(hex);
                // lipstickGfx.tint = hex;

                // draw a shape
                lipstickGfx.moveTo(points[48 * 2], points[48 * 2 + 1]);
                for (var i = 49; i < 60; i++) {
                    lipstickGfx.lineTo(points[i * 2], points[i * 2 + 1]);
                }

                lipstickGfx.lineTo(points[48 * 2], points[48 * 2 + 1] + 0.1);
                lipstickGfx.lineTo(points[60 * 2], points[60 * 2 + 1] + 0.1);
                lipstickGfx.lineTo(points[67 * 2], points[67 * 2 + 1]);
                lipstickGfx.lineTo(points[66 * 2], points[66 * 2 + 1]);
                lipstickGfx.lineTo(points[65 * 2], points[65 * 2 + 1]);
                lipstickGfx.lineTo(points[64 * 2], points[64 * 2 + 1]);
                lipstickGfx.lineTo(points[63 * 2], points[63 * 2 + 1]);
                lipstickGfx.lineTo(points[62 * 2], points[62 * 2 + 1]);
                lipstickGfx.lineTo(points[61 * 2], points[61 * 2 + 1]);
                lipstickGfx.lineTo(points[60 * 2], points[60 * 2 + 1]);
                lipstickGfx.lineTo(points[48 * 2], points[48 * 2 + 1]);

                lipstickGfx.endFill();

                renderer.render(stage);
            }
        };

        //clear lipstick PIXI
        function clearLipstick() {
            videoSprite.removeChild(lipstickGfx);
        }

        // Public API
        return {
            apply: drawLipstick,
            clear: clearLipstick
        };
    })();
