/**
 * @author Cernos(20.10.2008)
 * E-Mail: adm.styland@gmail.com
 * icq: 984-964
 * (http://www.humorland.org)
 */
    var img_array = [];
    var timer = 5000;
    var this_logo = 0;    
        
    function next_logo(){

        $("#image-banner-" + this_logo).fadeOut(2000);    
        
        if(this_logo == (img_array.length-1)) this_logo = -1;
        this_logo++;
        
        $("#image-banner-" + this_logo).fadeIn(2000);
        setTimeout("next_logo()",timer);
    }
    function imgs(img){
        for(var i = 0; i < img.length; i++){
            img_array[i] = img[i].getAttribute('src');
            img_array[i] = img[i].setAttribute('id','image-banner-'+i);
        }
    }
$(document).ready(function(){
        
    $("#banner_container").css({"height":"200px","width":"280px"});
    $("#banner_container img").css({"display":"none","position":"absolute","border":"none","margin-left":"10px"});    
    imgs($("#banner_container img").get());
    $("#image-banner-0").css({"display":"block"});
    
    $("#banner_container").html($("#banner_container").html() + '<p id="descr-banner"></p>');
    $("#descr-banner").css({"position":"absolute","z-index":"99","margin":"160px 0 0 15px","color":"white","font-weight":"bold","font-size":"14px"});

    if ($("#banner_container").attr("class") == "en")
    $("#descr-banner").html("Extra services");
    else
    $("#descr-banner").html("Дополнительные услуги");
    
    
    
    setTimeout("next_logo()",timer);
});

