jQuery.noConflict();

var slideShow = {

	speed : 1000,
	fadeSpeed : 400,
	container : '#tag',//reference to element holding all slides
	timer : null,
	timeOut : null,
	start : function(speed, fadeSpeed) {
	
		slideShow.speed = speed;
		slideShow.fadeSpeed = fadeSpeed;
		slideShow.timer = setInterval('slideShow.run()', slideShow.speed);
	
	},
	run : function() {
	
		//removes current and shows next slide
		var current = jQuery(slideShow.container + ' .current');
		var next = (current.next('.slideshow').length)?
			current.next('.slideshow') :
			jQuery(slideShow.container + ' .slideshow:first');
			
		current.animate({opacity: 0.0}, slideShow.fadeSpeed, function() {
			jQuery(this).removeClass('current');
		})
		next.css({opacity: 0.0}).addClass('current').animate({opacity: 1.0}, slideShow.fadeSpeed);
	
	}

}


jQuery(document).ready(function(jQuery) {
	/**
	 * START THE SLIDESHOW
	 */
	slideShow.start(8000, 700);
});
