Seems promising, but I get:
Uncaught ReferenceError: assignment to undeclared variable img
var blur = $("#background_b").data("blur");
img = new Image();
c = document.getElementById("background_b");
ctx = c.getContext("2d");
w = window.innerWidth;
h = window.innerHeight;
I think you meant to use commas instead of semicolons here.