/*!
 * nondeterministic - script
 * Released under the X11 a.k.a. MIT license
 * See /js/script.js
 */
$(document).ready(function(){$("#bg").attr("width",2*$(window).width()).attr("height",2*$(document).height());var a=document.getElementById("bg").getContext("2d"),b=$("h1");a.strokeStyle="rgb(224,224,224)";a.fillStyle="rgb(255,255,255)";a.lineCap="round";a.lineJoin="round";for(var d=3+Math.round(3*Math.random()),c=-$(window).height()/2,e=b.offset().left+b.width()/4,g=0;g<d;g++){var h=-100*Math.random(),c=c+2*(Math.random()*$(window).height()/d),f=b.offset().top+6+(b.height()-12)/(d+1)*(g+1);i(a,h,
c,e,f)}f=-$(window).height()/2;h=b.offset().left+b.width()/4;for(g=0;g<d;g++)e=$(window).width()-120+200*Math.random(),f+=Math.random()*$(window).height()/2,c=b.offset().top+6+(b.height()-12)/(d+1)*(g+1),i(a,h,c,e,f,!0),a.beginPath(),a.moveTo(e+22,f),a.lineTo(2*$(window).width(),f),a.stroke(),a.beginPath(),a.arc(e+11,f,10,0,2*Math.PI,!0),a.fill(),a.stroke();k()});
function i(a,b,d,c,e,g){var h=c-b,f=e-d,j=Math.random()*h/2;a.beginPath();a.moveTo(b,d);a.bezierCurveTo(c-j,d,b+h/2,d+f/2,b+h/2,d+f/2);a.bezierCurveTo(b+h/2,d+f/2,b+j,e,c,e);g&&(a.moveTo(c-2,e-2),a.lineTo(c,e),a.moveTo(c-2,e+2),a.lineTo(c,e));a.stroke()}
function k(){$(".video").each(function(a,b){var d=$(".still h2 a",b),c=$("h2.backup a",b);d.hover(function(){c.css("text-decoration","underline")},function(){c.css("text-decoration","")});c.hover(function(){d.css("text-decoration","underline")},function(){d.css("text-decoration","")})})};
