    //Slider Default
    
    $(window).load(function() {
         
        var $obj = $('#slider-default'); 
                
        //Auto
        function auto() {
            $obj.delay(5000).queue(function() {
                $(this).find('.next').trigger('click');
                $(this).dequeue();
            });
        }; 
        
        auto(); 
    
        //Avança
        $obj.find('.next').click(function() { 
            if (!$obj.find('ul').is(':animated') && $obj.find('ul li').length > 1) {
                $obj.find('ul').animate({
                    marginLeft: '-=' + $obj.find('li').outerWidth(true)
                }, 'slow', function() {
                    $(this).css('margin-left', 0);
                    $(this).children('li').first().appendTo($(this));
                });
            }
            auto();
        }); 
        
        //Retrocede
        $obj.find('.prev').click(function() {
            if (!$obj.find('ul').is(':animated') && $obj.find('ul li').length > 1) {
                $obj.find('ul').children('li').last().prependTo($obj.find('ul'));
                $obj.find('ul').css('margin-left', -$obj.find('ul').children('li').outerWidth(true));
                $obj.find('ul').animate({
                        marginLeft: '+=' + $obj.find('li').outerWidth(true)
                    }, 'slow', function(){
                }); 
            }   
        });  
        
        $obj.find('.mask').click(function() {
            $obj.find('li').each(function() {
                if ($(this).css('display') != 'none') {
                    window.location= $(this).find('a').attr('href'); return false;
                }
            });
        });   
    
    }); 
  
