(function ($) {
    window.applyTheme = function() {
        return;
        
        var canvas = document.getElementById('background_canvas'),
            ctx = canvas.getContext('2d'),
            $canvas = $(canvas),
            canvasWidth = $canvas.width(),
            canvasHeight = $canvas.height();
        
        var shapeNum = 0, shapes = [];
        for (var i=0; i<shapeNum; i++) {
            shapes.push({
                x: Math.random()*canvasWidth,
                y: Math.random()*canvasHeight,
                r: Math.random()*canvasWidth/3 + canvasHeight/14,
                cr: Math.ceil(Math.random()*255),
                cg: Math.ceil(Math.random()*255),
                cb: Math.ceil(Math.random()*255)
            });
        }
        //reset
        ctx.globalCompositeOperation = 'source-over';
        ctx.fillStyle = 'rgba(255, 192, 203, 1)';
        ctx.fillRect(0, 0, canvas.width, canvas.height);
        ctx.globalCompositeOperation = 'lighter';
        
        function rgba(alpha) {
            return 'rgba(' + this.cr + ',' + this.cg + ',' + this.cb + ',' + alpha + ')';
        }
        
        function render(ctx) {
            ctx.beginPath();
            ctx.moveTo(this.x, this.y);
            ctx.bezierCurveTo(this.x,    this.y- 3,   this.x- 5, this.y-15,   this.x-25, this.y-15);
            ctx.bezierCurveTo(this.x-55, this.y-15,   this.x-55, this.y+22.5, this.x-55, this.y+22.5);
            ctx.bezierCurveTo(this.x-55, this.y+40,   this.x-35, this.y+62,   this.x,    this.y+80);
            ctx.bezierCurveTo(this.x+35, this.y+62,   this.x+55, this.y+40,   this.x+55, this.y+22.5);
            ctx.bezierCurveTo(this.x+55, this.y+22.5, this.x+55, this.y-15,   this.x+25, this.y-15);
            ctx.bezierCurveTo(this.x+10, this.y-15,   this.x,    this.y- 3,   this.x,    this.y);
            
            var gradblur = ctx.createRadialGradient(this.x, this.y, 0, this.x, this.y, this.r);
            gradblur.addColorStop(0, rgba.call(this, 0.93));
            gradblur.addColorStop(0.4, rgba.call(this, 0.93));
            gradblur.addColorStop(0.7, rgba.call(this, 0.6));
            gradblur.addColorStop(0.9, rgba.call(this, 0.1));
            gradblur.addColorStop(1, rgba.call(this, 0));
            ctx.fillStyle = gradblur;
            ctx.fill();
        }
        
        function renderCircle(ctx) {
            ctx.beginPath();
            ctx.arc(this.x, this.y, this.r, 0, Math.PI*2, false);
            var gradblur = ctx.createRadialGradient(this.x, this.y, 0, this.x, this.y, this.r);
            gradblur.addColorStop(0, rgba.call(this, 0.93));
            gradblur.addColorStop(0.4, rgba.call(this, 0.93));
            gradblur.addColorStop(0.7, rgba.call(this, 0.6));
            gradblur.addColorStop(0.9, rgba.call(this, 0.1));
            gradblur.addColorStop(1, rgba.call(this, 0));
            ctx.fillStyle = gradblur;
            ctx.fill();
        }
        
        $.each(shapes, function(i, shape){
            //render.call(shape, ctx);
            renderCircle.call(shape, ctx);
        });
    }
})(jQuery);
