/* *****
 * User defined fade objects and messages
 *
 * These messages are used in fades triggered by mouseovers and
 * mouseouts on table cells.  They are the simplest type of fade and
 * require no extra Javascript code.
 */
var fader = new Array();

fader[0] = new fadeObject('fade0', 'dddddd', '000000', 20, 20);
fader[0].msg[0] = "This is an optional default message; the fade object on the right side has no default.  Mouseover each topic to make quotes fade in and out.";
fader[0].msg[1] = "Nowhere can a man find a quieter or more untroubled retreat than in his own soul.<br />- Marcus Aurelius";
fader[0].msg[2] = "Feeding the starving poor only increases their number.<br />- Ben Bova";
fader[0].msg[3] = "The limits of tyrants are prescribed by the endurance of those whom they oppose.<br />- Frederick Douglass";
fader[0].msg[4] = "The foolish man seeks happiness in the distance, the wise grows it under his feet.<br />- James Oppenheim";

fader[1] = new fadeObject('fade1', 'bbbbbb', '000000', 20, 20);
fader[1].msg[1] = "Success is relative. It is what we can make of the mess we have made of things.<br />- T.S. Eliot";
fader[1].msg[2] = "We have two ears and one mouth so we may listen more and talk the less.<br />- Epictetus";
fader[1].msg[3] = "It is better to be violent, if there is violence in our hearts, than to put on the cloak of nonviolence to cover impotence.<br />- Mahatma Gandhi";
fader[1].msg[4] = "Don't part with your illusions. When they are gone you may still exist, but you have ceased to live.<br />- Mark Twain";



/* *****
 * The code below describes how to make a throbbing or automatic fade
 * sequence of messages.  It is important to note that this function is
 * NOT part of the Buffered Text-Fade Effect, but merely an example of
 * how it can be used.  In this example, the throb() function controls
 * the commands which are sent to the fade engine; it is called
 * repeatedly at set time intervals rather than using mouseover events
 * as triggers.
 *
 * Notes:
 * - A global array "hash" is used to keep track of where each
 *   animation is currently in the sequence.
 * - The list of messages defined in the fader *must* start at one (1)
 *   and count upwards without skipping any integers.
 * - The third line of the throb() function controls how fast
 *   commands get sent to the fade engine.  It waits only 100 milli-
 *   seconds when fading out, but 5000 milliseconds (5 seconds) when
 *   fading in; this means the message will remain visible for about 5
 *   seconds before fading out again.
 *
 * Other types of fade animation are possible simply by designing
 * different ways to control the fade-ins and fade-outs!
 */
var hash = new Array();
function throb(item) {

  // If the hash array does not have an entry for this item, initialise it at 2
  if (!hash[item]) hash[item] = 2;

  // Send a fade command, using the hash array to tell us what parameters we should use
  fader[item].fade(Math.floor(hash[item] / 2), !(hash[item] % 2));

  // Call this function again for this same item after a certain amount of time
  setTimeout(function() {throb(item);}, (hash[item] % 2) ? 500 : 9000);

  // If we have exceeded the number of messages in this fader, start over again at 2
  if (++hash[item] > fader[item].msg.length * 2 - 1) hash[item] = 2;
}

fader[2] = new fadeObject('fade2', 'ffffff', '666666', 30, 30);
fader[2].msg[1] = "What I can say is this… the results from what you are doing are real and working! Thanks for all your help!<br /><br />- Connections For Business, FL";
fader[2].msg[2] = "The only change that I have made is that I finally fired my other PPC company in December and turned on SitePropeller for Google support. The 3rd one today said that I was number one on the paid listings….<br /><br />- Macro LLC, VA";
fader[2].msg[3] = "You guys were awesome!<br />Top quality and best designer/consultants team I've ever worked with!<br /> <br />- NoblePay, MA";
fader[2].msg[4] = "Thanks again for your patience through the many changes. I very much appreciate that you went over and above to take on the role of uploading the page to our site, video adds, etc.<br /> <br />- Chiropractic Marketing, TX";
fader[2].msg[5] = "You guys had clarity in brevity, and the responsiveness and willingness to go the extra mile was awesome. I am going to tell all my friends, family, neighbors, associates, and colleagues how awesome it is to interact with SitePropeller.<br /> <br />- PowerDreams, CA";
fader[2].msg[6] = "Just wanted to let you know JCJ has already received conversions this week. They are very happy, you did a nice job on their landing page. Thank you very much.<br /> <br />- Establish Online, MI";
fader[2].msg[7] = "You are great at adwords and google research. You have made me successful these last couple months.<br /> <br />-Real Estate Arena, GA";
fader[2].msg[8] = "I never knew what the other company was doing as they only talked to me If I called them.  Other than that I had no clue what/if they were doing.<br /><br />- Macro LLC, VA";
fader[2].msg[9] = "Over the last 12 months you guys have gotten me 103 new clients. Business has been great. Thank you SitePropeller.<br /><br />- Real Estate Arena, GA";
fader[2].msg[10] = "Your landing page for me increased my conversions by over 572%. I have more business than I can handle right now. You guys are awesome.<br /><br />- Salisbury Landscaping, MI";
fader[2].msg[11] = "You all have done a very nice job thus far for us. We are pleased with the results we have seen in just a short time – thank you very much!<br /><br />- Precision Quincey, IL";
fader[2].msg[12] = "This surpasses the vision I had of it! Great job, I love it.<br /><br />- JSO Technology, MI";


// Start this fader
setTimeout(function() {throb(2);}, 1000);



var hash = new Array();

function throb(item) {

  // If the hash array does not have an entry for this item, initialise it at 2
  if (!hash[item]) hash[item] = 3;

  // Send a fade command, using the hash array to tell us what parameters we should use
  fader[item].fade(Math.floor(hash[item] / 3), !(hash[item] % 3));

  // Call this function again for this same item after a certain amount of time
  setTimeout(function() {throb(item);}, (hash[item] % 3) ? 500 : 9000);

  // If we have exceeded the number of messages in this fader, start over again at 2
  if (++hash[item] > fader[item].msg.length * 3 - 1) hash[item] = 3;
}

fader[3] = new fadeObject('tagline', 'ffffff', '333333', 35, 35);
fader[3].msg[1] = "Your Sales Will Soar. Your Website Will Do What You Knew It Could Do.";
fader[3].msg[2] = "Discover the Fortune Hidden in Your Website with our PPC and SEO.";
fader[3].msg[3] = "Unleash the Power to Soaring Website Sales.";
fader[3].msg[4] = "You'll attract highly qualified customers.";
fader[3].msg[5] = "You'll be found when customers are looking for what you sell.";
fader[3].msg[6] = "You'll know exactly how many sales are the result of your investment.";

// Start this fader
setTimeout(function() {throb(3);}, 1000);



var hash = new Array();

function throb(item) {

  // If the hash array does not have an entry for this item, initialise it at 2
  if (!hash[item]) hash[item] = 4;

  // Send a fade command, using the hash array to tell us what parameters we should use
  fader[item].fade(Math.floor(hash[item] / 4), !(hash[item] % 4));

  // Call this function again for this same item after a certain amount of time
  setTimeout(function() {throb(item);}, (hash[item] % 4) ? 500 : 9000);

  // If we have exceeded the number of messages in this fader, start over again at 2
  if (++hash[item] > fader[item].msg.length * 4 - 1) hash[item] = 3;
}

fader[4] = new fadeObject('tagline2', 'ffffff', '333333', 40, 40);
fader[4].msg[1] = "You'll leap ahead of your top competitors without overspending.";
fader[4].msg[2] = "You'll have freedom to adjust your investment each month.";
fader[4].msg[3] = "It is the businesses that market themselves better, that win!";
fader[4].msg[4] = "A market is never saturated with a good product, but it is very quickly saturated with a bad one. ~Henry Ford";
fader[4].msg[5] = "Next to doing the right thing, the most important thing is to let people know you are doing the right thing. ~John D. Rockefeller";
fader[4].msg[6] = "The point to remember about selling things is that, as well as creating atmosphere and excitement around your products, you've got to know what you're selling. ~Stuart Wilde";

// Start this fader
setTimeout(function() {throb(4);}, 1000);