(function($) {
	$.fn.ImgRotator = function(p_options) {
	
		m_slideList = $(this).children().filter("div .slide");
		m_slideIndex = 0;

		$(m_slideList).filter(":gt(0)").hide();
		
		slideFadeIn();
	}
	
	function queSlide(){

		var slideIndex = ((m_slideIndex + 1) < m_slideList.length) ? (m_slideIndex + 1) : 0;
	
		$(m_slideList.filter(":eq(" + m_slideIndex + ")")).fadeOut("slow", slideFadeIn);
		
		m_slideIndex = slideIndex;
	}
	
	function slideFadeIn(){
		$(m_slideList.filter(":eq(" + m_slideIndex + ")")).fadeIn("fast");
		m_interval = setTimeout(function () { queSlide(); }, 3500);
	}
})(jQuery);
