$(document).ready(function() {
	var bannerId = 4;
	var fnAction = true;
	var timer = setInterval(fadeBanner, 4000);
    
	function fadeBanner() {
        //first image rel should be the same as the first image tags rel attr
		if(bannerId == 1) fnAction = false;
        //number needs to be 1 above how many images are contained
		if(bannerId == 5) fnAction = true;
		(fnAction == true) ? fadeOutBanner() : fadeInBanner();
	}//end function fadebanner
	
	function fadeOutBanner() {
		$('.banner[rel='+ bannerId +']').fadeOut(1000);	
		bannerId--;		
	}//end fadeOutBanner
	function fadeInBanner() {
        bannerId = (bannerId == 1) ? 2:bannerId;
		$('.banner[rel='+bannerId +']').fadeIn(1000);
		bannerId++;		
	}//end fadeInBanner
});//end main document