/*
    Custom JS File for Caps Screen Printing
    Author: Glide Interactive, Inc
    URL:    www.glideinteractive.com
*/
jQuery(document).ready(function($j) {
    /*-------------------------
    	Navigation
    ---------------------------*/
    $j("#navigation").lavaLamp({ fx: "easeOutBack", speed: 700 });
    $j("#footer .nav").lavaLamp({ fx: "easeOutBack", speed: 700 });
	
    $j('#navigation li.current .icons').css({
        display: 'block'
    });
    $j('#navigation li.current .icons img').css({
        display: 'block'
    });
    $j('#navigation li.current').removeClass('not');
    $j('#navigation li.current .icons_shadow').css({
        display: 'block'
    });
    $j('#navigation li.not').hover(
        function(){
            // animate icon
            $j(this).find('.icons').css({
                display: 'block'
            }).find('img').css({
                height: '0',
                width:  '0',
                bottom: '-50px',
                left:   '30px'
            }).stop().animate({
                height: '100%',
                width:  '100%',
                bottom: '15px',
                left:   '0'
            }, 500).animate({ 
                bottom: '0'
            }, 150);
            // animate shadow
            $j(this).find('.icons_shadow').stop().animate({
                left: '55px',
                height: '0px',
                width:  '0px',
                bottom: '10px'
            }, 350 ).animate({
                height: '25px',
                width:  '72px',
                left:   '12px',
                bottom: '0px'
            }, 150 ).animate({
                height: '27px',
                width:  '80px',
                left:   '10px'
            }, 100).animate({
                height: '25px',
                width:  '72px',
                left:   '12px'
            }, 100);
        },
        function(){
            // animate icon
            $j(this).find('.icons img').stop().animate({
                height: '0',
                width:  '0',
                bottom: '-50px',
                left:   '30px'
            }, 400).find('.icons').css({
                display: 'none'
            });
            // animate shadow
            $j(this).find('.icons_shadow').stop().animate({
                height: '0',
                width:  '0',
                left:   '55px'
            }, 50 ).css({
                display: 'none',
                height: '0',
                width:  '0',
                left:   '55px'
            });
        }
    );
    
    $j('#navigation li.current .icons img').animate({
            height: '100%',
            width:  '100%',
            bottom: '15px',
            left:   '0'
        }, 500).animate({ 
            bottom: '0'
        }, 150);
    $j('#navigation li.current .icons_shadow').animate({
            left: '55px',
            height: '0px',
            width:  '0px',
            bottom: '10px'
        }, 350 ).animate({
            height: '25px',
            width:  '72px',
            left:   '12px',
            bottom: '0px'
        }, 200 ).animate({
            height: '27px',
            width:  '80px',
            left:   '10px'
        }, 100).animate({
            height: '25px',
            width:  '72px',
            left:   '12px'
        }, 100);
    $j('.rating').rating('readOnly', 'true');
});
