

$(document).ready(function(){

    //Fix Errors - http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup/


//	$("#topnav .subtext").fadeOut(0);


    //Remove outline from links
    $("a").click(function(){
        $(this).blur();
    });


    //When mouse rolls over
    $("#topnav #product").mouseover(function(){
		$(this).stop().animate({height:'180px',backgroundColor:'#000000'},{queue:false, duration:400, easing: 'easeInCubic'}),
		$("#productSubtext").stop().animate({opacity:1.00},600)
    });

    //When mouse is removed
    $("#topnav #product").mouseout(function(){
		$(this).stop().animate({height:'70px', backgroundColor:'#254085'},{queue:false, duration:400, easing: 'easeOutCubic'}),
		$("#productSubtext").stop().animate({opacity:0.00},400)
    });

    // onClick
    $("#topnav #product").click(function() {
		window.location = $(this).find("a").attr("href");
    });




    //When mouse rolls over
    $("#topnav #company").mouseover(function(){
		$(this).stop().animate({height:'180px',backgroundColor:'#000000'},{queue:false, duration:400, easing: 'easeInCubic'}),
		$("#companySubtext").stop().animate({opacity:1.00},600)
    });

    //When mouse is removed
    $("#topnav #company").mouseout(function(){
		$(this).stop().animate({height:'70px', backgroundColor:'#254085'},{queue:false, duration:400, easing: 'easeOutCubic'}),
		$("#companySubtext").stop().animate({opacity:0.00},400)
    });

    // onClick
    $("#topnav #company").click(function() {
		window.location = $(this).find("a").attr("href");
    });




    //When mouse rolls over
    $("#topnav #technology").mouseover(function(){
		$(this).stop().animate({height:'180px',backgroundColor:'#000000'},{queue:false, duration:400, easing: 'easeInCubic'}),
		$("#technologySubtext").stop().animate({opacity:1.00},600)
    });

    //When mouse is removed
    $("#topnav #technology").mouseout(function(){
		$(this).stop().animate({height:'70px', backgroundColor:'#254085'},{queue:false, duration:400, easing: 'easeOutCubic'}),
		$("#technologySubtext").stop().animate({opacity:0.00},400)
    });

    // onClick
    $("#topnav #technology").click(function() {
		window.location = $(this).find("a").attr("href");
    });




    //When mouse rolls over
    $("#topnav #services").mouseover(function(){
		$(this).stop().animate({height:'180px',backgroundColor:'#000000'},{queue:false, duration:400, easing: 'easeInCubic'}),
		$("#servicesSubtext").stop().animate({opacity:1.00},600)
    });

    //When mouse is removed
    $("#topnav #services").mouseout(function(){
		$(this).stop().animate({height:'70px', backgroundColor:'#254085'},{queue:false, duration:400, easing: 'easeOutCubic'}),
		$("#servicesSubtext").stop().animate({opacity:0.00},400)
    });

    // onClick
    $("#topnav #services").click(function() {
		window.location = $(this).find("a").attr("href");
    });





    //When mouse rolls over
    $("#topnav #investors").mouseover(function(){
		$(this).stop().animate({height:'180px',backgroundColor:'#000000'},{queue:false, duration:400, easing: 'easeInCubic'}),
		$("#investorsSubtext").stop().animate({opacity:1.00},600)
    });

    //When mouse is removed
    $("#topnav #investors").mouseout(function(){
		$(this).stop().animate({height:'70px', backgroundColor:'#254085'},{queue:false, duration:400, easing: 'easeOutCubic'}),
		$("#investorsSubtext").stop().animate({opacity:0.00},400)
    });

    // onClick
    $("#topnav #investors").click(function() {
		window.location = $(this).find("a").attr("href");
    });





$("#productSubtext").stop().animate({opacity:0.00},0);
$("#companySubtext").stop().animate({opacity:0.00},0);
$("#technologySubtext").stop().animate({opacity:0.00},0);
$("#servicesSubtext").stop().animate({opacity:0.00},0);
$("#investorsSubtext").stop().animate({opacity:0.00},0);



});




