//disjointed rollover function starting point
var currentfeat= 1;
function overLi(color,object){
	//make a variable and assign the hovered id to it
	var elid = $(object).attr('id');
	var featnum= parseInt(elid.substr(8,1));
	var next= featnum+1;
	var prev= featnum-1;
	var total= $("div#featureClick li").length - 2;
	if(next > total) next= 1;
	if(prev < 1) prev= total;
	
	$("#feature-prev").html("<a href=\"javascript:overLi('#576B8A',$('#feature-"+prev+"'));\">&lt; </a>");
	$("#feature-next").html("<a href=\"javascript:overLi('#576B8A',$('#feature-"+next+"'));\"> &gt;</a>");
	//$(object).prev("li").css({'border-bottom':'1px dotted ' + color });
	
	//if it's not currently on the selected list item, then switch
	if($("#" + elid + " a").attr("class") != "cur"){
		$("div#featureClick a").removeClass("cur");
		$("#" + elid + " a").addClass("cur");
	
		//hide the image currently there
		for(var i= 0;i<=total;i++){
			//alert(i+" "+total);
			if(i==total){
				//fade in the image with the same id as the selected buttom
				$("div#bannerImages div#" + elid + "a").fadeIn("slow");
				$("div#bannerImages div#" + elid + "b").fadeIn("slow");
			}else{
				$("div#bannerImages div#feature-"+(i+1)+"a").hide();
				$("div#bannerImages div#feature-"+(i+1)+"b").hide();
			}
		}
		//$("div#bannerImages div").css("display","none");
	}
}

function offLi(color, object,curSelected){
	var elid = $(object).attr('id');
	
	if(curSelected != ''){
		$("#"+curSelected + " a").addClass("cur");
	}
	
//	if(elid != curSelected){
//		$("#" + elid + " a").removeClass("cur");
//	}
	
	//$(object).prev("li").css({'border-bottom':'1px dotted ' + color });
	
	/*if(elid != "featureHor-5" && elid != "featureVer-5"){
		$(object).css({'border-bottom':'1px dotted ' + color });
	}*/
}
		