/* Copyright 2009 FriendFeed */

(function(){var G=window.innerWidth||(document.documentElement&&document.documentElement.clientWidth);if(!window.__cloudMyLife&&G){window.__cloudMyLife=true;var B=250;var D="/static/images/themes/grasslands/cloud";var L=".png?v=1";var P=null;var C=null;var F=null;var N=null;function O(){var R=document.createElement("div");var Q=R.style;Q.position="fixed";Q.border="0";Q.padding="0";Q.left="0";Q.top="0";Q.lineHeight="0";Q.width=B+"px";Q.height="171px";Q.zIndex=-10;Q.display="none";Q.background="url('"+D+"1"+L+"') no-repeat top left";document.body.appendChild(R);return R}function M(){if(window.innerWidth){return{width:window.innerWidth,height:window.innerHeight}}return{width:document.documentElement.clientWidth,height:document.documentElement.clientHeight}}function H(){I(P,80);if(F){window.clearInterval(F)}F=window.setInterval(K,80+Math.floor(Math.random()*20))}function K(){if(P.offsetLeft<-B){window.clearInterval(F);P.style.display="none";window.setTimeout(H,4000+Math.random()*1000);return }P.style.left=(P.offsetLeft-1)+"px"}function J(){I(C,M().height/2);if(N){window.clearInterval(N)}N=window.setInterval(A,80+Math.floor(Math.random()*40))}function A(){if(C.offsetLeft<-B){window.clearInterval(N);C.style.display="none";window.setTimeout(J,3000+Math.random()*1000);return }C.style.left=(C.offsetLeft-1)+"px"}function I(Q,S){var R=M();Q.style.left=(R.width+B)+"px";Q.style.top=Math.round(Math.random()*S)+"px";Q.style.backgroundImage="url('"+D+Math.floor(Math.random()*42+1).toString()+L+"')";Q.style.display=""}function E(){P=O();C=O();H();window.setTimeout(J,20000)}window.setTimeout(E,100)}})();

