
//Efeito links menu topo

$("#menu-topo a").live(
    "mouseover mouseleave", 
    function(event) {
        if ( event.type == "mouseover" ) {
            $(this).stop(true,true).animate({
                'color': '#FFC700'
            });
        } else {
            $(this).stop(true,true).animate({
                'color': '#fff'
            });
        }
    }
    );

//Player 

$(document).ready(function(){

    // Local copy of jQuery selectors, for performance.
    var	my_jPlayer = $("#jquery_jplayer"),
    my_trackName = $("#jp_container .track-name"),
    my_playState = $("#jp_container .play-state"),
    my_extraPlayInfo = $("#jp_container .extra-play-info");

    // Some options
    var	opt_play_first = true, // If true, will attempt to auto-play the default track on page loads. No effect on mobile devices, like iOS.
    opt_auto_play = true, // If true, when a track is selected, it will auto-play.
    opt_text_playing = "Now playing", // Text when playing
    opt_text_selected = "Track selected"; // Text when not playing

    // A flag to capture the first track
    var first_track = true;

    // Change the time format
    $.jPlayer.timeFormat.padMin = false;
    $.jPlayer.timeFormat.padSec = false;
    $.jPlayer.timeFormat.sepMin = " min ";
    $.jPlayer.timeFormat.sepSec = " sec";

    // Initialize the play state text
    my_playState.text(opt_text_selected);

    // Instance jPlayer
    my_jPlayer.jPlayer({
        ready: function () {
            $("#jp_container .track-default").click();
        },
        timeupdate: function(event) {
            my_extraPlayInfo.text(parseInt(event.jPlayer.status.currentPercentAbsolute, 10) + "%");
        },
        play: function(event) {
            my_playState.text(opt_text_playing);
        },
        pause: function(event) {
            my_playState.text(opt_text_selected);
        },
        ended: function(event) {
            my_playState.text(opt_text_selected);
        },
        swfPath: "js",
        cssSelectorAncestor: "#jp_container",
        supplied: "mp3",
        wmode: "window"
    });

    // Create click handlers for the different tracks
    $("#jp_container .track").click(function(e) {
        my_trackName.text($(this).text());
        my_jPlayer.jPlayer("setMedia", {
            mp3: $(this).attr("href")
        });
        if((opt_play_first && first_track) || (opt_auto_play && !first_track)) {
            my_jPlayer.jPlayer("play");
        }
        first_track = false;
        $(this).blur();
        return false;
    });
        
    $(".fancybox-thumb").fancybox({
        prevEffect	: 'none',
        nextEffect	: 'none',
        helpers	: {
            title	: {
                type: 'outside'
            },
            overlay	: {
                opacity : 0.8,
                css : {
                    'background-color' : '#000'
                }
            },
            thumbs	: {
                width	: 50,
                height	: 50
            }
        }
    });
    $(".various").fancybox({
        maxWidth	: 640,
        maxHeight	: 480,
        fitToView	: false,
        width		: '70%',
        height		: '70%',
        autoSize	: false,
        closeClick	: false,
        openEffect	: 'fade',
        closeEffect	: 'fade'
    });
    
    $('#s1').cycle('fade');
            $("#tweet-gabrielzheg").tweet({
          avatar_size: 50,
          count: 1,
          username: "GabrielZHeG",
          loading_text: "Carregando twitter..."
         });
         
         
         $('#banners-sidebar').cycle({ 
    fx:     'fade', 
    speed:  'fast', 
    timeout: 0, 
    next:   '.next-chamada-lateral', 
    prev:   '.prev-chamada-lateral' 
});

        $("#tweet-zehenriquezhg").tweet({
          avatar_size: 50,
          count: 1,
          username: "ZeHenriqueZHG",
          loading_text: "Carregando twitter..."
         });
        $("#tweet-zhegabriel").tweet({
          avatar_size: 50,
          count: 1,
          username: "ZHeGabriel",
          loading_text: "Carregando twitter..."
         });
    
    
});

