$(function() {
    
    $(".form-label").each(function() {
        var input = $(this).parent().find("#" + $(this).attr("for"));
        var label = $(this);
        
        if (input.val() != "") $(this).hide();
        
        input.bind('hastext', function() {
            label.hide();
        });
        
        input.bind('notext', function() {
            label.show();
        });
    }); 
    
    
    $("#section_intro img").hover(function() {
        //$(".logo-intro").show();
    }, function() {
        //$(".logo-intro").hide();
    });
    
    $("form .label").click(function() {
        $(this).parent().find("[name=" + $(this).attr("for") + "]").focus();
    });
    
    var menu_side = false;
    var menu_side_left = $(".block-menu-side").css('left');
    $(".block-menu-side").hover(function() {
        if (! menu_side)
        {
            menu_side = true;
            $(this).stop().animate({left: 0}, 500, 'easeInOutExpo');
        }
    }, function() {
        menu_side = false;
        $(this).stop().animate({left: menu_side_left}, 500, 'easeInOutExpo');
    });
    
});
