/*

Main Javascript for jQuery Realistic Hover Effect
Created by Adrian Pelletier
http://www.adrianpelletier.com

*/

/* =Realistic Navigation
============================================================================== */

// Begin jQuery
	
$(document).ready(function() {

    /* =Reflection Nav
	-------------------------------------------------------------------------- */	
		
    // Append span to each LI to add reflection
		
    $("#nav-reflection li").append("<span></span>");
		
		
    // Animate buttons
		
    $("#nav-reflection a").not('.active').hover(function() {
        $(this).stop(false, true).animate({
            height: "57px",
            marginTop: "5px"
        }, 200);
        $(this).parent().find("span").stop(false, true).animate({
            height: "57px",
            //marginTop: "1px",
            opacity: 1
        }, 200);
    },function(){ 
        $(this).stop(true, true).animate({
            marginTop: "0px", 
            height: "62px"
        }, 300);
        $(this).parent().find("span").top(true, true).animate({
            //marginTop: "-3px", 
            height: "62px", 
            opacity: 1
        }, 300);
    });
    // Click
    $('#nav-reflection a').not('.active').click(function() {
        $('#nav-reflection a').animate({
            marginTop: "0px", 
            height: "62px"
        }, 300);
        $('#nav-reflection a').parent().find("span").stop(false, true).animate({
            marginTop: "-3px", 
            height: "62px", 
            opacity: 1
        }, 300);
        $(this).unbind('mouseenter mouseleave');
        $(this).animate({
            marginTop: "25px", 
            height: "37px"
        }, 100);
        $(this).parent().find("span").animate({
            marginTop: "1px", 
            height: "36px", 
            opacity: 1
        }, 100);
    });
    $('#nav-reflection .active').next('span').addClass('active-reflect');

    /* =Shadow Nav
	-------------------------------------------------------------------------- */
	
    // Append shadow image to each LI
		
 /*   $("#nav-shadow li").append('<img class="shadow" src="images/icons-shadow.jpg" width="81" height="27" alt="" />');
	
    // Animate buttons, shrink and fade shadow
		
    $("#nav-shadow li").hover(function() {
        var e = this;
        $(e).find("a").stop().animate({
            marginTop: "-14px"
        }, 250, function() {
            $(e).find("a").animate({
                marginTop: "-10px"
            }, 250);
        });
        $(e).find("img.shadow").stop().animate({
            width: "80%", 
            height: "20px", 
            marginLeft: "8px", 
            opacity: 0.25
        }, 250);
    },function(){
        var e = this;
        $(e).find("a").stop().animate({
            marginTop: "4px"
        }, 250, function() {
            $(e).find("a").animate({
                marginTop: "0px"
            }, 250);
        });
        $(e).find("img.shadow").stop().animate({
            width: "100%", 
            height: "27px", 
            marginLeft: "0", 
            opacity: 1
        }, 250);
    });*/
						
// End jQuery
	
});
