// Hover effects for links

$(function(){
	
	$(".banner").hover(

		function()
		{
			$(this).clone().css( { 
								position: "absolute", 
								background: "#fff", 
								margin:"-12px 0 0 0", 
								left:0, 
								//height:"30px",
								opacity:0 })
								.addClass("hover_active").prependTo(this).animate({ opacity:1.0}, 350 );
		},

		function(){
				$(".hover_active:animated").stop().animate({ opacity:0 }, 250, function(){ $(this).remove(); });
				$(".hover_active").stop().animate({ opacity:0 }, 250, function(){ $(this).remove(); });
		}
	);

	$("#header li a:not('.active')").hover(
		function()
		{
			$(this).find('.hover_active').stop().remove();
			$(this).clone().css( { 	
								position: "absolute", 
								background: "#266382", 
								margin:0, 
								left:"4px", 
								top:"1px", 
								padding:"2px 6px 2px 6px", 
								height:0, 
								opacity:0 })
								.addClass("hover_active").prependTo(this).animate({ opacity:1.0, height:"22px" }, 400);
		},

		function(){
			
			$(".hover_active").animate({ opacity: 0, height:0 }, 300, function(){ $(this).remove(); });
		}
	)	
		
	/* PRELOADING IMAGES 8/ */
	if (document.images)
	{
		preload_image = new Image(0,0); 
	  	preload_image.src="images/gallery1.jpg";
		
	}
	
})
