﻿AdvertImageCycler =
{
    AnimationSpeed: 750,
    RemoveAdvertItem: function(item) {
        $(item).remove();
    },
    PreloadAdvertImage: function(imgPath) {
        var nextImg = new Image();
        nextImg.src = imgPath;
    },
    DisplayAdvertImage: function(jqCont, html) {
    if (jqCont != null) {
            var childImg = jqCont.find('a');
            if (childImg != null && childImg.size() > 0) {
                this.RemoveAdvertItem(childImg);
            }
            else {
                childImg = jqCont.find('img');
                if (childImg != null && childImg.length > 0) {
                    this.RemoveAdvertItem(childImg);
                }
            }
            jqCont.html(html);
            jqCont.hide();
            jqCont.fadeIn(this.AnimationSpeed);
        }
    }
};
