/*

Main Javascript for jQuery Realistic Hover Effect
Created by Adrian Pelletier
http://www.adrianpelletier.com

*/

/* =Realistic Navigation
============================================================================== */

	// Begin jQuery
	
	$(document).ready(function() {
				
	/* =Shadow Nav
	-------------------------------------------------------------------------- */
	
		// Append shadow image to each LI
		
		$("#nav-shadow li").append('<img class="shadow" src="http://bsv-freiburg.de/wordpress/wp-content/themes/bsv/js/shadow/shadow.png" width="20" height="20" alt=" />');
	
		// Animate buttons, shrink and fade shadow
		
		$("#nav-shadow li").hover(function() {
			var e = this;
		    $(e).find("a").stop().animate({ marginTop: "-8px" }, 300,
				function(){
					$(e).find("a").animate({ marginTop: "0px" }, 200);
			
			});
		    $(e).find("img.shadow").stop().animate({ opacity: 0.25 }, 300,
				function(){
					$(e).find("img.shadow").animate({ opacity: 1 }, 200);
			
				});
			
			
		},function(){
			var e = this;
		    $(e).find("a").stop().animate({ marginTop: "0px" }, 150);
		    $(e).find("img.shadow").stop().animate({ opacity: 1 }, 150);
		});
						
	// End jQuery
	
	});
