$(document).ready(function(){
						   $(".featdiv").css("opacity",0);
						   $(".topscreens").css("opacity",0);
						   $(".topscreens").css("display","block");
						    $(".topscreenbgs").css("opacity",.6);
						   

						   $(".arrow").eq(0).animate({"left":"315px"},{queue:false, duration:300});
						   showfeat(0);
						   
	$(".featdiv").each(function(){
								$(this).css("opacity",0);
								}
								);
	
	for(myslides=0;myslides<$(".largeover").length;myslides++){
	
	//$(".buttonsbuttons a").click(function(){
	$(".largeover").eq(myslides).mouseover(function(){
													
		hideallbut($(".largeover").index(this));										
												//	alert($(".largeover").index(this));
		mynumber=$(".largeover").index(this);
		hideallbut(mynumber);
		
		$(".arrow").eq(mynumber).stop().animate({"left":"315px"},{queue:false, duration:300});
		showfeat(mynumber);
		//$(myfly).find("img").css("width","15px");
	});
	$(".largeover").eq(myslides).mouseout(function(){
		mynumber=$(".largeover").index(this);
		
		//$(".arrow img").eq(mynumber).stop().animate({width:1},{queue:false, duration:250});
		//hidefeat(mynumber);
	});
	}
	
	
	function showfeat(thisfeat){
		//alert("showing"+thisfeat);
		$(".topscreens").eq(thisfeat).css("z-index",50);
		$(".featdiv").eq(thisfeat).stop().animate({opacity:1},{queue:false, duration:750});
		$(".topscreens").eq(thisfeat).stop().animate({opacity:1},{queue:false, duration:750});
		//$(".featdiv").eq(thisfeat).css("opacity",1);
		
	}
	
	function hidefeat(thisfeat){
		$(".topscreens").eq(thisfeat).css("z-index",1);
		//$(".featdiv").eq(thisfeat).css("opacity",0);
		$(".featdiv").eq(thisfeat).stop().animate({opacity:0},{queue:false, duration:500});
		
	}
	
	function hideallbut(thisfeat){
		
		$(".arrow").each(function(){
				if(thisfeat!=$(".arrow").index(this)&&parseInt($(this).css("left"))>300){			  
									  
		$(this).stop().animate({"left":"150px"},{queue:false, duration:250});
		}
		});
		
		$(".featdiv").each(function(){
								//	alert(thisfeat);
				if(thisfeat!=$(".featdiv").index(this)&&$(this).css("opacity")>0){					
									//$(this).css("zindex",1);
									$(this).stop().animate({opacity:0},{queue:false, duration:500});
									}
									});
		
		$(".topscreens").each(function(){
								//	alert(thisfeat);
				if(thisfeat!=$(".topscreens").index(this)&&$(this).css("opacity")>0){					
									$(this).css("z-index",1);
									$(this).stop().animate({opacity:0},{queue:false, duration:500});
									}
									});
		
		
		
	} //end of hideallbut
	
});
