transition from one css to other
<p>i want to develop a webpage in which i need to change css after every 60 sec and images after every 30sec.</p>

<p>But during the transition from one css to other it takes so much time to download the css and images,also transition is not very smooth.</p>

<p>So, is there any way by which i could download all the css and images, that i need for the transition, when the page loads first time??</p>

<p>I am using following code to change css:</p>

<pre><code>&lt;script type="text/javascript"&gt;
            var interval

            $(document).ready(function() {
            interval = setInterval("tog()", 60000);
            });
&lt;/script&gt;

function tog()


{

if (currentStyle == "css/style_purple.css") 
  {

         $("#stylesheet").attr({href : "css/style_green.css"});

        currentStyle = "css/style_green.css";

   } 

else 

if (currentStyle == "css/style_green.css") 
 {

    currentStyle = $("#stylesheet").attr({href : "css/style_orange.css"});

     currentStyle = "css/style_orange.css";

   } 

else if (currentStyle == "css/style_orange.css") 
{

    currentStyle = $("#stylesheet").attr({href : "css/style_red.css"});

    currentStyle = "css/style_red.css";

}
else if (currentStyle == "css/style_purple.css") 
{  

   currentStyle = $("#stylesheet").attr({href : "css/style_red.css"});

   currentStyle = "css/style_red.css";

} 

else

{

   currentStyle =  $("#stylesheet").attr({href : "css/style_purple.css"});

    currentStyle = "css/style_purple.css";

}

}
</code></pre>
