﻿/// <reference path="jquery-1.3.2-vsdoc2.js" />

var index = 1;
$(function(){
    
    var front = $("#front-image");
    var back = $("#back-image");
    
    //$(".titleImage").attr("src","../images/homepage-3.jpg");
    setInterval(function(){
     
     index++;
     if(index > 9)
        index = 1;
                     
     front.fadeOut(1000);
     
     setTimeout(function(){
        front.css("z-index",1);
        back.css("z-index",2);
        front.attr("src","images/homepage-"+index+".jpg");
        front.fadeIn(10);
        
        var exchange = back;
        back = front;
        front = exchange;        
     },1000);   
        
    },2750);
});