﻿
jQuery(function($) {
    $(document).pngFix();
});

home_class = function() {
    
    this.currentLogoPos = 0;
    this.nextLogoPos = 3;
    
    this.rotateLogos();
}

home_class.prototype.rotateLogos = function() {

    this.currentLogoCont = $('#rotator_' + this.currentLogoPos);
    this.nextLogoCont = $('#rotator_' + this.nextLogoPos);
    this.currentLogoPos = this.nextLogoPos;
    this.nextLogoPos += 3;

    $(this.currentLogoCont).hide();

    if ($(this.nextLogoCont).attr('id')) {
        $(this.nextLogoCont).fadeIn('slow');
    } else {
        this.currentLogoPos = 0;
        this.nextLogoPos = 3;
    }

    setTimeout(callBack, 5000);
}

function callBack() {
    home.rotateLogos();
}

$(document).ready(function() {

    home = new home_class(); 
});
