var fadeEffectCust=function(){
	return{
		init:function(id, flag, target){
			this.elem = document.getElementById('Thumb'+id);
			clearInterval(this.elem);
			this.target = target ? target : flag ? 100 : 0;
			this.flag = flag || -1;
			if(this.elem.style.opacity == 100) {
				this.elem.alpha = 0;
			} else {
				this.elem.alpha = this.elem.style.opacity ? parseFloat(this.elem.style.opacity) * 100 : 0;
			}
			this.elem = setInterval(function(){fadeEffectCust.tween()}, 20);
		},
		tween:function(){
			//alert('this.alpha: '+this.alpha);
			if(this.alpha == this.target){
				clearInterval(this);
				this.style.opacity = 100;
			}else{
				var value = Math.round(this.alpha + ((this.target - this.alpha) * .05)) + (1 * this.flag);
				this.style.opacity = value / 100;
				this.style.filter = 'alpha(opacity=' + value + ')';
				this.elem = value
			}
		}
	}
}();
/*
var fadeEffectCust = function slideSwitch() {
    var $active = $('.slideshow img.active-slide');

    if ( $active.length == 0 ) $active = $('.slideshow IMG:last');

    var $next =  $active.next().length ? $active.next()
        : $('.slideshow IMG:first');

    $active.addClass('last-active-slide');

    $next.css({opacity: 0.0})
        .addClass('active-slide')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active-slide last-active-slide');
        });
}

*/
