jQuery().ready(function(){
	jQuery('#bannerRotativo').jcarousel({
        scroll: 1,
		auto: 6,
        animation: 500,
		wrap: 'both',
        initCallback: mycarousel_controlador
    });

	$('a[rel="external"]').click( function() {
		window.open( $(this).attr('href') );
		return false;
	});
});

function mycarousel_controlador(carousel) {

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });

};

function openChatAtendimento() {
	window.open('http://www.dipelnet.com.br/suporte/livehelp.php?department=2', 'Chat Online', 'height=390,width=585' );
	return false;
}

function openChatSuporte() {
	window.open('http://www.dipelnet.com.br/suporte/livehelp.php?department=1', 'Chat Online', 'height=390,width=585' );
	return false;
}

function openChatFinanceiro() {
	window.open('http://www.dipelnet.com.br/suporte/livehelp.php?department=3', 'Chat Online', 'height=390,width=585' );
	return false;
}
