$(document).ready
(
	function()
	{
        //inicio: googlemaps
        $("#googlemap").jmap
        (
            {
                mapCenter: [-23.622075, -46.759143],
                mapZoom: 17,
                mapShowOverview: false,
                mapShowType: false
             }
         ).searchAddress
             (
                {         
                    address: $("#endereco").html(),
                    addMarker: true,
                    showAddress: true
                 }
            );
        //fim: googlemaps

        //inicio: jcarousel
        $('#jcarousel').jcarousel
        (
            {
                auto: 5,
                scroll: 1
            }
        );
        //fim: jcarousel

        //inicio: menu
        $("#sf-menu").superfish();
        //fim: menu

        //inicio: notificações
        $("#notification a:first").click
        (
            function()
            {
                $("#notification").fadeOut();
            }
        );
        //fim: notificações

        //inicio: tabs
        $(".tabNavigation li a:first").addClass("first selected");
        $(".tabContainers div[id*='tab']").hide();
        $(".tabContainers div:first").show();

        $(".tabNavigation li a").click
        (
            function()
            {
                $tab = $(this).attr("href");

                $(".tabContainers div[id*='tab']").hide();
                $('.tabNavigation li a').removeClass('selected');
                
                $(this).addClass('selected');
                $(".tabContainers div#" + $tab).slideDown();
                
                return false;
            }
        );
        //fim: tabs

        //inicio: tooltip
//        $('.tooltip').tooltip
//        (
//            {
//                showURL: false,
//                top: -25,
//                left: 20
//            }
//        );
        //fim: tooltip

	}

);
function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};