﻿var fadeInSpeed = 5000;

jQuery.fn.Animate =
(
    function() {
                setInterval($.fn.BeginAnimation,72000);
                jQuery.fn.BeginAnimation();
               });

jQuery.fn.BeginAnimation =
(
    function() {
            $(document).everyTime("0s", function()  { $.fn.AnimationMethod("Natasha", "Images/TashPanther250x400.jpg", "<br/><br/><br/><br/><p>Sings, plays keyboards and helps to create the synthetic sounds and melodies.<br/><br/> Her voice is enchanting and mystical, lifting Nubes' atmosphere and meaning to a new level. She is a unique and melodically gifted musician.</p>"); }, 1);
            $(document).everyTime("18s", function() { $.fn.AnimationMethod("Jon", "Images/BlackJon250x400.jpg", "<br/><br/><br/><p>Plays guitar and uses Logic and Cubase to create Nube's dark and unusual sounds. Armed with a Sampler, Delay Pedal and Keyboard on stage, he and Natasha take care of the synthetic duties. <br/><br/>His guitar style is unique, almost synth like, adding another atmospheric layer to Nube.</p>"); }, 1);
            $(document).everyTime("36s", function() { $.fn.AnimationMethod("Barny", "Images/BarnandBass250x400.jpg", "<br/><br/><br/><p>Plays bass and provides backing vocals. He has amazing groove and due to the vast number of different musicians he has played with, a solid and very creative touch too.<br/><br/>He has great dynamic ability and provides a solid wall of melodious bass to fatten Nubes' sound.</p>"); }, 1);
            $(document).everyTime("54s", function() { $.fn.AnimationMethod("Graham", "Images/GInBush250x400.jpg", "<br/><br/><br/><br/><br/><p>His style is the perfect compliment to Nubes' progressive vibe and electronic sound. <br/><br/>Creating uplifting grooves <br/>and dancy beats, his drums flow in unity to the melodies <br/>of Nube.</p>"); }, 1);
            });


jQuery.fn.AnimationMethod =
(
    function(Name, imgURL, text) {

        $("#FadingHeader").text(Name);
        $("#FadingHeader").fadeIn(fadeInSpeed);
        $("#FadeImage").attr({ src: imgURL });
        $("#FadeImage").fadeIn(fadeInSpeed, function() {
            $("#FadeImage").fadeTo(2000, 0.2);
            $("#TextDiv").fadeIn(fadeInSpeed); $("#TextDiv").html(text);
            $("#FadingHeader").delay(11000).fadeOut(500, function() { $("#FadeImage").fadeOut(700); });
            $("#TextDiv").delay(6000).fadeOut(700);
        });
    }

);


