$(document).ready(function(){
    
	$('.liAtivo').css({
        display: 'inline-block',
        width: '23px',
        height: '18px',
        marginLeft: '1px',
        paddingTop: '5px',
        background: '#B23D3D'
    });
	
	$('.liAtivo2').css({background: '#9C3737'});
    
    $('#balao p:eq(0)').css({
        paddingTop: '10px'
    });
    
    $('.botoes a:eq(0)').css({
        marginLeft: '0px'
    });
	
	$('.itens div.itemSexshop:eq(0)').css({
        marginLeft: '0px'
    });
    
});

function slideSwitch(proximo){
    var $active = $('#vitrine div.active');
    
	$active.addClass('last-active');
    
    // verifica se existe um próximo objeto na div #vitrine, caso ele nao exista, retorna para o primeiro
	if (proximo == undefined) {
		var $next = $active.next().length ? $active.next() : $('#vitrine div.item:first');
	}else{
		$('div[valor]').each(function(){
			if($(this).attr('valor') == proximo){
				$next = $(this);
			}
		})
	}
		
    // Codigo que define as transicoes entre as imagens
    $next.css({
        opacity: 0.0
    }).addClass('active').animate({
        opacity: 1.0
    }, 1000, function(){
        $active.removeClass('active last-active');
    });
}

$(function(){
    //Executa a fun��o a cada 5 segundos
    setInterval("slideSwitch()", 5000);
});

function slideSwitchDois(){
    var $activeDois = $('#slideshow div.activeDois');
    
    $activeDois.addClass('last-activeDois');
    
    // verifica se existe um próximo objeto na div #slideshow, caso ele nao exista, retorna para o primeiro
    var $nextDois = $activeDois.next().length ? $activeDois.next() : $('#slideshow div:first');
    
    // Codigo que define as transicoes entre as imagens
    $nextDois.css({
        opacity: 0.0
    }).addClass('activeDois').animate({
        opacity: 1.0
    }, 1000, function(){
        $activeDois.removeClass('activeDois last-activeDois');
    });
}

$(function(){
    //Executa a função a cada 5 segundos
    setInterval("slideSwitchDois()", 6000);
});

$(function(){
    // this initialises the demo scollpanes on the page.
   /* $('#pane1').jScrollPane();
    $('#pane2').jScrollPane({
        showArrows: true
    });
    $('#pane3, #pane4').jScrollPane({
        scrollbarWidth: 10,
        scrollbarMargin: 10
    });
    */
    // this allows you to click a link to add content to #pane4 and shows how to 
    // reinitialise the scrollbars when you have done this.
    $('#add-content').bind('click', function(){
        $('#pane4').append($('<p></p>').html($('#intro').html())).jScrollPane({
            scrollbarWidth: 10,
            scrollbarMargin: 10
        });
    });
    // and this allows you to click the link to reduce the amount of content in
    // #pane4 and reinitialise the scrollbars.
    $('#remove-content').bind('click', function(){
        $('#pane4').empty().append($('<p></p>').html($('#intro').html())).jScrollPane({
            scrollbarWidth: 10,
            scrollbarMargin: 10
        });
    });
});
