var config;jQuery(document).ready(function(){if(canvasSupport.check()&&window.Worker){var a=document.getElementById("theCanvas");$(a).css("display","none");config={canvasWidth:900,canvasHeight:500,max:500,timeout:15E3,workerFile:"http://www.digitalartweeks.ethz.ch/worker.min.js",brightness:15,x0:-2.5,x1:1,y0:-1,y1:1};config.canvasWidth=window.innerWidth;config.canvasHeight=window.innerHeight;drawCanvas(a)}});
function drawCanvas(a){a.setAttribute("width",config.canvasWidth);a.setAttribute("height",config.canvasHeight);var c=a.getContext("2d");config.imageData=c.createImageData(config.canvasWidth,config.canvasHeight);var b=new Worker(config.workerFile),d=setTimeout(function(){b.terminate()},config.timeout);b.postMessage(config);b.onmessage=function(b){clearTimeout(d);c.putImageData(b.data,0,0);$(a).fadeIn(5E3)};b.onerror=function(a){throw Error(a);}}
var canvasSupport={canvasCompatible:!1,check:function(){try{this.canvasCompatible=!!document.createElement("canvas").getContext("2d")}catch(a){this.canvasCompatible=!!document.createElement("canvas").getContext}return this.canvasCompatible}};
