$(document).ready(function(){
    Cufon.replace('#subContainer h2, #subContainer h3, .verticisBox h2, .verticisBox h1',{hover:true});

    $('a[title], p[title], img:not(.disableTip, #showcaseSlider img)').qtip({
        style: {
            name: 'dark',
            border: {
                radius: 5
            },
            tip: true
        },
        position: {
            target: 'mouse',
            adjust: {
                screen: true,
                x: 10, y: 20
            }
        }
    })
    
    $('#showcaseSlider img[alt]').qtip({
        style: {
            name: 'dark',
            border: {
                radius: 6
            },
            tip: true
        },
        position: {
            target: 'mouse',
            adjust: {
                screen: true,
                mouse: false,
                x: 30, y: 30
            }
        },
        show: {
            solo: true
        },
        hide: {
            when: 'mouseout', fixed: true,
            delay: 1000
        }
    });

    // Açao para hover dos menus
    $("#bodyMenu > ul > li").mouseover(function() {
        var a = $(this).find("h2").find("a");
        if (!$(a).hasClass("hover")) {
            $("#bodyMenu a.hover").removeClass("hover");
            $(a).addClass("hover");
        }
    });
    if (!$.browser.msie) {
        $("#portfolio .picture a").hover(
            function() {
                $("#showcaseInfo").remove();
                $(this).append($('<div id="showcaseInfo"></div>'))
                $("#showcaseInfo").css('top', $(this).position().top - 132);
                $("#showcaseInfo").css('left', $(this).position().left);
                $("#showcaseInfo").animate({"opacity": "0.4"}, "fast");
            },
            function() {
                $("#showcaseInfo").animate({"opacity": "0"}, "fast", function() {$(this).remove()});
            });
    }
    

});
