<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IT Pie Blog &#187; snow effect</title>
	<atom:link href="http://www.itpie.co.uk/blog/index.php/tag/snow-effect/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.itpie.co.uk/blog</link>
	<description>Get a piece of our digital pie straight from the blog</description>
	<lastBuildDate>Thu, 13 Oct 2011 15:47:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Happy 1st of December &#8211; want some Christmas fun?</title>
		<link>http://www.itpie.co.uk/blog/index.php/2009/12/01/happy-1st-of-december-want-some-christmas-fun/</link>
		<comments>http://www.itpie.co.uk/blog/index.php/2009/12/01/happy-1st-of-december-want-some-christmas-fun/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 12:55:53 +0000</pubDate>
		<dc:creator>Geraint</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[Christmas]]></category>
		<category><![CDATA[snow effect]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[website fun]]></category>

		<guid isPermaLink="false">http://itpie.co.uk/blog/?p=320</guid>
		<description><![CDATA[{lang: 'en-GB'}So it&#8217;s the 1st of December and in the IT Pie office we thought we&#8217;d ensure you have a chance of a white Christmas with this cheeky little script. Simple right click and save one of the following images &#8230; <a href="http://www.itpie.co.uk/blog/index.php/2009/12/01/happy-1st-of-december-want-some-christmas-fun/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px; padding-top:3px;"><g:plusone size="medium" count="1" href="http://www.itpie.co.uk/blog/index.php/2009/12/01/happy-1st-of-december-want-some-christmas-fun/">{lang: 'en-GB'}</g:plusone></div><p>So it&#8217;s the 1st of December and in the IT Pie office we thought we&#8217;d ensure you have a chance of a white Christmas with this cheeky little script.</p>
<p>Simple right click and save one of the following images to your images folder on your website:   <img class="alignnone size-full wp-image-322" title="snow3" src="http://itpie.co.uk/blog/wp-content/uploads/2009/12/snow3.gif" alt="snow3" width="25" height="28" /> <img class="size-full wp-image-321 alignnone" title="snow" src="http://itpie.co.uk/blog/wp-content/uploads/2009/12/snow.gif" alt="snow" width="24" height="24" /></p>
<p>Then copy and paste the below script into you web page after the &lt;body&gt; tag:</p>
<table border="1" width="100%">
<tbody>
<tr>
<td>&lt;script type=&#8221;text/javascript&#8221;&gt;</p>
<p>/******************************************<br />
* Snow Effect Script- By Altan d.o.o. (http://www.altan.hr/snow/index.html)<br />
* Visit Dynamic Drive DHTML code library (http://www.dynamicdrive.com/) for full source code<br />
* Last updated Nov 9th, 05&#8242; by DD. This notice must stay intact for use<br />
******************************************/</p>
<p>//Configure below to change URL path to the snow image<br />
var snowsrc=&#8221;images/snow.gif&#8221;<br />
// Configure below to change number of snow to render<br />
var no = 10;<br />
// Configure whether snow should disappear after x seconds (0=never):<br />
var hidesnowtime = 0;<br />
// Configure how much snow should drop down before fading (&#8220;windowheight&#8221; or &#8220;pageheight&#8221;)<br />
var snowdistance = &#8220;pageheight&#8221;;</p>
<p>///////////Stop Config//////////////////////////////////</p>
<p>var ie4up = (document.all) ? 1 : 0;<br />
var ns6up = (document.getElementById&amp;&amp;!document.all) ? 1 : 0;</p>
<p>function iecompattest(){<br />
return (document.compatMode &amp;&amp; document.compatMode!=&#8221;BackCompat&#8221;)? document.documentElement : document.body<br />
}</p>
<p>var dx, xp, yp;    // coordinate and position variables<br />
var am, stx, sty;  // amplitude and step variables<br />
var i, doc_width = 800, doc_height = 600;</p>
<p>if (ns6up) {<br />
doc_width = self.innerWidth;<br />
doc_height = self.innerHeight;<br />
} else if (ie4up) {<br />
doc_width = iecompattest().clientWidth;<br />
doc_height = iecompattest().clientHeight;<br />
}</p>
<p>dx = new Array();<br />
xp = new Array();<br />
yp = new Array();<br />
am = new Array();<br />
stx = new Array();<br />
sty = new Array();<br />
snowsrc=(snowsrc.indexOf(&#8220;dynamicdrive.com&#8221;)!=-1)? &#8220;snow.gif&#8221; : snowsrc<br />
for (i = 0; i &lt; no; ++ i) {<br />
dx[i] = 0;                        // set coordinate variables<br />
xp[i] = Math.random()*(doc_width-50);  // set position variables<br />
yp[i] = Math.random()*doc_height;<br />
am[i] = Math.random()*20;         // set amplitude variables<br />
stx[i] = 0.02 + Math.random()/10; // set step variables<br />
sty[i] = 0.7 + Math.random();     // set step variables<br />
if (ie4up||ns6up) {<br />
if (i == 0) {<br />
document.write(&#8220;&lt;div id=\&#8221;dot&#8221;+ i +&#8221;\&#8221; style=\&#8221;POSITION: absolute; Z-INDEX: &#8220;+ i +&#8221;; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\&#8221;&gt;&lt;a href=\&#8221;http://dynamicdrive.com\&#8221;&gt;&lt;img src=&#8217;&#8221;+snowsrc+&#8221;&#8216; border=\&#8221;0\&#8221;&gt;&lt;\/a&gt;&lt;\/div&gt;&#8221;);<br />
} else {<br />
document.write(&#8220;&lt;div id=\&#8221;dot&#8221;+ i +&#8221;\&#8221; style=\&#8221;POSITION: absolute; Z-INDEX: &#8220;+ i +&#8221;; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\&#8221;&gt;&lt;img src=&#8217;&#8221;+snowsrc+&#8221;&#8216; border=\&#8221;0\&#8221;&gt;&lt;\/div&gt;&#8221;);<br />
}<br />
}<br />
}</p>
<p>function snowIE_NS6() {  // IE and NS6 main animation function<br />
doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;<br />
doc_height=(window.innerHeight &amp;&amp; snowdistance==&#8221;windowheight&#8221;)? window.innerHeight : (ie4up &amp;&amp; snowdistance==&#8221;windowheight&#8221;)?  iecompattest().clientHeight : (ie4up &amp;&amp; !window.opera &amp;&amp; snowdistance==&#8221;pageheight&#8221;)? iecompattest().scrollHeight : iecompattest().offsetHeight;<br />
for (i = 0; i &lt; no; ++ i) {  // iterate for every dot<br />
yp[i] += sty[i];<br />
if (yp[i] &gt; doc_height-50) {<br />
xp[i] = Math.random()*(doc_width-am[i]-30);<br />
yp[i] = 0;<br />
stx[i] = 0.02 + Math.random()/10;<br />
sty[i] = 0.7 + Math.random();<br />
}<br />
dx[i] += stx[i];<br />
document.getElementById(&#8220;dot&#8221;+i).style.top=yp[i]+&#8221;px&#8221;;<br />
document.getElementById(&#8220;dot&#8221;+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+&#8221;px&#8221;;<br />
}<br />
snowtimer=setTimeout(&#8220;snowIE_NS6()&#8221;, 10);<br />
}</p>
<p>function hidesnow(){<br />
if (window.snowtimer) clearTimeout(snowtimer)<br />
for (i=0; i&lt;no; i++) document.getElementById(&#8220;dot&#8221;+i).style.visibility=&#8221;hidden&#8221;<br />
}</p>
<p>if (ie4up||ns6up){<br />
snowIE_NS6();<br />
if (hidesnowtime&gt;0)<br />
setTimeout(&#8220;hidesnow()&#8221;, hidesnowtime*1000)<br />
}</p>
<p>&lt;/script&gt;</td>
</tr>
</tbody>
</table>
<p>Ensure that the &#8216;var snowsrc=&#8221;images/snow.gif&#8221;&#8216; points at the image you have just saved (you may need to rename the file) and there you go. A White Christmas on your website.</p>
<p>Hope you enjoy</p>
<p>The IT Pie team</p>
<p>Thanks to <a href="http://www.dynamicdrive.com/dynamicindex3/snow.htm" target="_blank">Dynamic Drive</a> and the author <a href="mailto:snow@altan.hr">Sasa Skevin</a> for the script.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itpie.co.uk/blog/index.php/2009/12/01/happy-1st-of-december-want-some-christmas-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

