﻿//<script src="http://www.yesodei.org/js/jquery.min.js" type="text/javascript"></script>

var quotes = new Array(
    '"Every child is an artist. The problem is how to remain an artist once he grows up"',
    '"Art is not what you see, but what you make others see."',
    '"You see what you know!"',
    '"I try to apply colors like words that shape poems, like notes that shape music. "',
    '"Art is everywhere, except it has to pass through a creative mind. "',
    '"Great art picks up where nature ends."',
    '"A line is a dot that went for a walk."',
    '"The painter should paint not only what he has in front of him, but also what he sees inside himself."',
    '"There\'s no retirement for an artist, it\'s your way of living so there\'s no end to it. "',
    '"What do I ask of a painting? I ask it to astonish, disturb, seduce, convince. "',
    '"Color is my day-long obsession, joy and torment."',
    '"There are always two people in every picture: the photographer and the viewer."'
);

var names = new Array(
    'Pablo Picasso',
    'Edgar Degas',
    'Jackson Pollock',
    'Joan Miro',
    'Louise Nevelson',
    'Marc Chagall',
    'Paul Klee',
    'Caspar David Friedrich ',
    'Henry Moore',
    'Lucian Freud',
    'Claude Monet ',
    'Ansel Adams '
);

//var quotes = new Array(
//	'"An artist lies to reach another kind of truth."',
//    '"Every child is an artist. The problem is how to remain an artist once he grows up."',
//    '"Art is born in attention. Its midwife is detail."',
//    '"The artist is nothing without the gift, but the gift is nothing without work."',
//    '"Art, like morality, consists of drawing the line somewhere."',
//    '"Good art maketh glad the heart of man."',
//    '"Ars Longa, Vita Brevis" - Art is Long, Life is Short"',
//    '"Every good painter paints what he is."',
//    '"The big artist...keeps an eye on nature and steals her tools."',
//    '"Art washes from the soul the dust of everyday life."',
//    '"A man paints with his brains and not with his hands."',
//    '"Art doesn\'t transform.  It just plain forms."',
//    '"The position of the artist is humble.  He is essentially a channel."',
//    '"The most beautiful thing we can experience is the mysterious."',
//    '"The job of the artist is always to deepen the mystery."',
//    '"Art evokes the mystery without which the world would not exist."',
//    '"There is no must in art because art is free."',
//    '"I shut my eyes in order to see."',
//    '"The painting has a life of its own."',
//    '"Art is not what you see, but what you make others see."',
//    '"It takes a very long time to become young."',
//    '"It has bothered me all my life that I do not paint like everybody else."',
//    '"Art is everywhere, except it has to pass through a creative mind."',
//    '"Beauty is the purgation of superfluities."',
//    '"Poor is the pupil who does not surpass his master."',
//    '"A beautiful thing never gives so much pain as does failing to hear and see it."',
//    '"Art is not the truth, art is a lie that makes us realize the truth."'
//	);

//var names = new Array(
//    'Pablo Picasso',
//    'Pablo Picasso',
//    'Julia Cameron',
//    'Emile Zola',
//    'G.K. Chesterton',
//    'Jeff Krewson',
//    'Hippocrates',
//    'Jackson Pollock',
//    'Thomas Eakins',
//    'Pablo Picasso',
//    'Michelangelo',
//    'Roy Lichtenstein',
//    'Piet Mondrian',
//    'Albert Einstein',
//    'Francis Bacon',
//    'Rene Magritte',
//    'Wassily Kandinsky',
//    'Paul Gauguin',
//    'Jackson Pollock',
//    'Degas',
//    'Pablo Picasso',
//    'Henri Matisse',
//    'Louise Nevelson',
//    'Michaelangelo',
//    'Leonardo da Vinci',
//    'Michelangelo',
//    'Picasso'
//);

//start with  a random quote and then loop through
var index = Math.floor(Math.random() * quotes.length);

function FadeOutQuote() {
    $('#tdQuote').fadeTo('slow', 0, SwapQuote);
}

function SwapQuote() {
    //the span that holds the quote
    var objSpnQuote = document.getElementById('spnQuote');
    objSpnQuote.innerHTML = quotes[index];

    //the span that holds the name
    var objSpnQuoteName = document.getElementById('spnQuoteName');
    objSpnQuoteName.innerHTML = '- ' + names[index];

    $('#tdQuote').fadeTo('slow', 1);

    //next quote
    index++;

    //jump back to the beginning if needed
    if (index == quotes.length) {
        index = 0;
    }

    //reset the timer to run again
    var t = setTimeout("FadeOutQuote()", 15000);
}
