﻿quoteRotator = {
    i: 1,
    quotes: ["The nation which had once held the creed that greatness is achieved by production, is now told that it is achieved by squalor. <span id='quoteauthor'>Ayn Rand - <cite>Atlas Shrugged</cite></span>",
"Men have been taught that their first concern is to relieve the suffering of others. But suffering is a disease. Should one come upon it, one tries to give relief and assistance. To make that the highest test of virtue is to make suffering the most important part of life. <span id='quoteauthor'>Ayn Rand - <cite>The Fountainhead</cite></span>",
"There is no such thing as 'the public interest' except as the sum of the interests of individual men. And the basic, common interest of all men—all rational men—is freedom. Freedom is the first requirement of 'the public interest'—not what men do when they are free, but that they are free. All their achievements rest ...on that foundation. <span id='quoteauthor'>“'The Fascist New Frontier” - <cite>The Ayn Rand Column</cite>, 111.</span>",
"Men have been taught that it is a virtue to agree with others. But the creator is the man who disagrees. Men have been taught that it is a virtue to swim with the current. But the creator is the man who goes against the current. Men have been taught that it is a virtue to stand together. But the creator is the man who stands alone. <span id='quoteauthor'>Ayn Rand - <cite>The Fountainhead</cite></span>",
"Since there is no such entity as 'the public,' since the public is merely a number of individuals, any claimed or implied conflict of 'the public interest' with private interests means that the interests of some men are to be sacrificed to the interests and wishes of others. <span id='quoteauthor'>“The Monument Builders” - <cite>The Virtue of Selfishness</cite></span>",
"Look at everyone around us. You’ve wondered why they suffer, why they seek happiness and never find it. If any man stopped and asked himself whether he’s ever held a truly personal desire, he’d find the answer. He’d see that all his wishes, his efforts, his dreams, his ambitions are motivated by other men. <span id='quoteauthor'>Ayn Rand - <cite>The Fountainhead</cite></span>",
"Men have been taught that the ego is the synonym of evil, and selflessness the ideal of virtue. But the creator is the egotist in the absolute sense, and the selfless man is the one who does not think, feel, judge, or act. These are functions of the self. <span id='quoteauthor'>Ayn Rand - <cite>The Fountainhead</cite></span>",
"The worst guilt is to accept an undeserved guilt--and that is what you have been doing all your life. You have been paying blackmail, not for your vices, but for your virtues. You have been willing to carry the load of an unearned punishment--and to let it grow the heavier the greater the virtues you practiced. <span id='quoteauthor'>Ayn Rand - <cite>Atlas Shrugged</cite></span>",

					],
    numQuotes: 8,
    fadeDuration: 2,
    fadeoutDuration: 0,
    delay: 5,
    quotesInit: function() {
        if (this.numQuotes < 1) {
            document.getElementById('quoterotator').innerHTML = "No Quotes Found";
        } else {
            this.quoteRotate();
            setInterval('quoteRotator.quoteRotate()', (this.fadeDuration + this.fadeoutDuration + this.delay) * 1000);
        }
    },
    quoteRotate: function() {
        jQuery('#quoterotator').hide().html(this.quotes[this.i - 1]).fadeIn(this.fadeDuration * 1000).animate({ opacity: 1.0 }, this.delay * 1000).fadeOut(this.fadeoutDuration * 1000);
        this.i = this.i % (this.numQuotes) + 1;
    }

}

