﻿var aww_whitelist = 1; //for those horrible, horrible people with adblock enabled.. you know who you are!
var stopclouds = 0;

$(function () {
    var backgroundwidth = 8000;

    var offset = offset = Math.round(Math.floor(Math.random() * (backgroundwidth + 1)));

    function scrollbackground() {
        // decrease the offset by 1, or if its less than 1 increase it by
        // the background height minus 1
        offset = (offset < 1) ? offset + (backgroundwidth - 1) : offset - 1;
        // apply the background position
        $('body').css("background-position", offset + "px 0px");
        // call self to continue animation
        if (stopclouds == 0) {
            setTimeout(function () {
                scrollbackground();
            }, 150
			);
        }
    }

    // Start the animation
    scrollbackground();

});
