jQuery(function($) {
    $("#demoContent").find('.replace').bind('click', function() {
        $("#default-usage-select").selectbox();
    });
    $("#demoSidebar").find('.undo').bind('click', function() {
        $("#default-usage-select2").parents('.jquery-selectbox').unselectbox();
    });
    $("#demoContent2").selectbox().bind('change', function() {
        $('teste').appendTo('#demoContent2 .demoTarget').fadeOut(5000, function() {
        });

    });
    $("#demoContent").selectbox().bind('change', function() {
        $('teste').appendTo('#demoContent .demoTarget').fadeOut(5000, function() {
        });

    });
    $("#demoSidebar").selectbox().bind('change', function() {
        $('teste02').appendTo('#demoSidebar .demoTarget2').fadeOut(5000, function() {
            $(this).remove();
        });

    });

    //$('.galeria a').colorbox({ maxWidth: '500px', rel: 'group1', current: "{current} de {total}", next: 'Próximo', previous: 'Anterior', close: 'Fechar' });

    $(".galeria a").fancybox({
        'transitionIn' : 'none',
        'transitionOut' : 'none',
        'titlePosition' : 'over',
        'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
            return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
        }
    });

    $('#menu li').hover(function() {
        $(this).children('.submenu').show();
    }, function() {
        $(this).children('.submenu').hide();
    });
});
